Commit a81191e1 authored by Fabien Morin's avatar Fabien Morin

add web_site_id to the cache method id as an instance can have many web_sites using admin toolbar

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33372 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1ed36bc8
......@@ -64,6 +64,8 @@ if module_id_list is None:\n
\n
portal = context.getPortalObject()\n
user = portal.portal_membership.getAuthenticatedMember().getUserName()\n
web_site_id = getattr(context, \'getWebSiteValue\', None) is not None and \\\n
context.getWebSiteValue().getId()\n
\n
def getModuleItemList(user=None):\n
gettext = portal.Localizer.erp5_ui.gettext\n
......@@ -78,8 +80,8 @@ def getModuleItemList(user=None):\n
item_list.sort(key=lambda x: x[0])\n
return item_list\n
\n
getModuleItemList = CachingMethod(getModuleItemList, \n
id=(\'WebSection_getToolbarModuleItemList\', portal.Localizer.get_selected_language(), portal.portal_url()),\n
getModuleItemList = CachingMethod(getModuleItemList,\n
id=(\'WebSection_getToolbarModuleItemList\', portal.Localizer.get_selected_language(), portal.portal_url(), web_site_id),\n
cache_factory=\'erp5_ui_short\')\n
\n
return getModuleItemList(user=user)\n
......@@ -127,6 +129,8 @@ return getModuleItemList(user=user)\n
<string>context</string>
<string>portal</string>
<string>user</string>
<string>getattr</string>
<string>web_site_id</string>
<string>getModuleItemList</string>
</tuple>
</value>
......
912
\ No newline at end of file
913
\ 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