From f15f80b349ae2f8089805d9271b0f7d2acc4c383 Mon Sep 17 00:00:00 2001 From: Lucas Carvalho <lucas@nexedi.com> Date: Tue, 27 Jul 2010 13:01:53 +0000 Subject: [PATCH] Added include_language argument. Sometimes we don't need the language on the url. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37284 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../tiolive_base/ERP5Site_getTioLiveSiteRootUrl.xml | 11 +++++++---- bt5/tiolive_base/bt/revision | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bt5/tiolive_base/SkinTemplateItem/portal_skins/tiolive_base/ERP5Site_getTioLiveSiteRootUrl.xml b/bt5/tiolive_base/SkinTemplateItem/portal_skins/tiolive_base/ERP5Site_getTioLiveSiteRootUrl.xml index fd2d6650cb..8f2cd1b21e 100644 --- a/bt5/tiolive_base/SkinTemplateItem/portal_skins/tiolive_base/ERP5Site_getTioLiveSiteRootUrl.xml +++ b/bt5/tiolive_base/SkinTemplateItem/portal_skins/tiolive_base/ERP5Site_getTioLiveSiteRootUrl.xml @@ -64,7 +64,7 @@ language = context.Localizer.get_selected_language()\n # websites are usually not included in the url. But this\n # script is also used in tiolive instances, and from them\n # it is impossible to have the configuration of the web site\n -if language is not None:\n +if language is not None and include_language:\n root_url = "%s/%s" % (root_url, language)\n \n return root_url\n @@ -78,7 +78,7 @@ return root_url\n </item> <item> <key> <string>_params</string> </key> - <value> <string></string> </value> + <value> <string>include_language=1</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -98,12 +98,13 @@ return root_url\n <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>0</int> </value> + <value> <int>1</int> </value> </item> <item> <key> <string>co_varnames</string> </key> <value> <tuple> + <string>include_language</string> <string>_getattr_</string> <string>context</string> <string>root_url</string> @@ -120,7 +121,9 @@ return root_url\n <item> <key> <string>func_defaults</string> </key> <value> - <none/> + <tuple> + <int>1</int> + </tuple> </value> </item> <item> diff --git a/bt5/tiolive_base/bt/revision b/bt5/tiolive_base/bt/revision index 832332893a..3d9aebb2cc 100644 --- a/bt5/tiolive_base/bt/revision +++ b/bt5/tiolive_base/bt/revision @@ -1 +1 @@ -67 \ No newline at end of file +68 \ No newline at end of file -- 2.30.9