Commit 8a64d00a authored by Yoshinori Okuji's avatar Yoshinori Okuji

2008-06-11 yo

* Append LOCALIZER_LANGUAGE=xxx to the redirected URL in Base_doLanguage. This is a hack to prevent false caching.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21483 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 46e86379
......@@ -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 @@ portal.Localizer.changeLanguage(select_language)\n
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>_getitem_</string>
<string>url</string>
<string>delimiter</string>
</tuple>
</value>
</item>
......
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.
\ No newline at end of file
551
\ No newline at end of file
552
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment