[Erp5-report] r21483 - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: SkinTemplat...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jun 11 02:15:48 CEST 2008


Author: yo
Date: Wed Jun 11 02:15:47 2008
New Revision: 21483

URL: http://svn.erp5.org?rev=21483&view=rev
Log:
2008-06-11 yo
* Append LOCALIZER_LANGUAGE=xxx to the redirected URL in Base_doLanguage. This is a hack to prevent false caching.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/change_log
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.xml?rev=21483&r1=21482&r2=21483&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.xml Wed Jun 11 02:15:47 2008
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.PythonScripts.PythonScript</string>
-          <string>PythonScript</string>
-        </tuple>
-        <none/>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -68,10 +65,28 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string># XXX Localizer-dependent\n
+            <value> <string encoding="cdata"><![CDATA[
+
+# XXX Localizer-dependent\n
 portal = context.getPortalObject()\n
-portal.Localizer.changeLanguage(select_language)\n
-</string> </value>
+\n
+# Make the URL for the redirection. The language is appended, because when HTTP caching is utilized,\n
+# If-Modified-Since ignores Vary, so the URL must be different from another language. Note that this\n
+# is still a kind of hack, because the language is not appended to other links.\n
+\n
+# XXX relying on the referer is a bad idea, but we don\'t have any other way to retrieve the original URL\n
+# currently.\n
+url = context.REQUEST[\'HTTP_REFERER\']\n
+if \'?\' in url:\n
+  delimiter = \'&\'\n
+else:\n
+  delimiter = \'?\'\n
+url = \'%s%sLOCALIZER_LANGUAGE=%s\' % (url, delimiter, select_language)\n
+\n
+portal.Localizer.changeLanguage(select_language, goto=url)\n
+
+
+]]></string> </value>
         </item>
         <item>
             <key> <string>_code</string> </key>
@@ -123,6 +138,9 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>portal</string>
+                            <string>_getitem_</string>
+                            <string>url</string>
+                            <string>delimiter</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/change_log?rev=21483&r1=21482&r2=21483&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/change_log (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/change_log Wed Jun 11 02:15:47 2008
@@ -1,3 +1,6 @@
+2008-06-11 yo
+* Append LOCALIZER_LANGUAGE=xxx to the redirected URL in Base_doLanguage. This is a hack to prevent false caching.
+
 2008-06-09 kazuhiko
 * Add icons for domain tree.
 
@@ -205,4 +208,4 @@
 
 2006-06-15 Vincent
 * Initial commit.
-* Valid XHTML1.0 Strict + CSS 2.0.
+* Valid XHTML1.0 Strict + CSS 2.0.

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision?rev=21483&r1=21482&r2=21483&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision Wed Jun 11 02:15:47 2008
@@ -1,1 +1,1 @@
-551
+552




More information about the Erp5-report mailing list