Commit 834427b9 authored by Jérome Perrin's avatar Jérome Perrin

remove preferred visible modules


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6191 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 91b29ecc
......@@ -73,11 +73,6 @@ user = context.portal_membership.getAuthenticatedMember().getUserName()\n
\n
portal = context.getPortalObject()\n
\n
# (BIG) HACK : we invalidate cache if we are call without filter\n
# (ie when we are editing the PreferredVisibleModuleList)\n
if not filter : \n
clearCache()\n
\n
## do not filter when there is no visible module selected\n
try : \n
if len(portal.portal_preferences.getPreferredVisibleModuleList()) == 0 : \n
......@@ -85,7 +80,7 @@ try : \n
except ConflictError : raise\n
except : filter = 0\n
\n
def getModuleItemList(user=None, portal_path=None, filter=filter):\n
def getModuleItemList(user=None, portal_path=None):\n
gettext = context.Localizer.erp5_ui.gettext\n
item_list = []\n
try :\n
......@@ -95,8 +90,7 @@ def getModuleItemList(user=None, portal_path=None, filter=filter):\n
url = module.getPath()\n
label = module.getTitleOrId()\n
label = gettext(label)\n
if not filter or url in portal.portal_preferences.getPreferredVisibleModuleList() : \n
item_list.append((label, url))\n
item_list.append((label, url))\n
except ConflictError : raise\n
except: pass\n
except ConflictError : raise\n
......@@ -108,7 +102,7 @@ def getModuleItemList(user=None, portal_path=None, filter=filter):\n
\n
getModuleItemList = CachingMethod(getModuleItemList, id=\'ERP5Site_getModuleItemList\')\n
portal_path = context.getPortalObject().getPhysicalPath()\n
return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n
return getModuleItemList(user=user, portal_path=portal_path)\n
</string> </value>
</item>
<item>
......@@ -123,7 +117,7 @@ return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>filter=1</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -143,13 +137,12 @@ return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>filter</string>
<string>Products.ERP5Type.Cache</string>
<string>CachingMethod</string>
<string>clearCache</string>
......@@ -160,6 +153,7 @@ return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n
<string>user</string>
<string>portal</string>
<string>len</string>
<string>filter</string>
<string>None</string>
<string>getModuleItemList</string>
<string>portal_path</string>
......@@ -174,9 +168,7 @@ return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<int>1</int>
</tuple>
<none/>
</value>
</item>
<item>
......
......@@ -106,7 +106,6 @@
<value>
<list>
<string>my_priority</string>
<string>my_preferred_visible_module_list</string>
<string>my_preferred_section_category</string>
</list>
</value>
......
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