From 1ab863ed2161a69d85452b48223ddff6193d03b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Fri, 24 Nov 2006 19:41:04 +0000 Subject: [PATCH] manage_tabs_message is the ZMI counterpart of portal_status_message, use it for cache_tool_configure git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11477 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/Tool/CacheTool.py | 14 +++++++------- product/ERP5Type/dtml/cache_tool_configure.dtml | 4 ---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/product/ERP5Type/Tool/CacheTool.py b/product/ERP5Type/Tool/CacheTool.py index 780837bcfa..def234d218 100644 --- a/product/ERP5Type/Tool/CacheTool.py +++ b/product/ERP5Type/Tool/CacheTool.py @@ -39,9 +39,9 @@ from Products.ERP5Type.CachePlugins.DistributedRamCache import DistributedRamCac from Products.ERP5Type.CachePlugins.SQLCache import SQLCache ## try to import needed modules for cache plugins -try: +try: import memcache -except ImportError: +except ImportError: pass class CacheTool(BaseTool): @@ -111,7 +111,7 @@ class CacheTool(BaseTool): pass self.erp5_sql_transactionless_connection.manage_test(my_query) if REQUEST is not None: - self.REQUEST.RESPONSE.redirect('cache_tool_configure?portal_status_message=Cache table successfully created.') + self.REQUEST.RESPONSE.redirect('cache_tool_configure?manage_tabs_message=Cache table successfully created.') security.declareProtected(Permissions.AccessContentsInformation, 'parseDBConnectionString') def parseDBConnectionString(self, connection_string): @@ -172,7 +172,7 @@ class CacheTool(BaseTool): cp.initCacheStorage() CachingMethod.factories[key] = CacheFactory(item['cache_plugins'], item['cache_params']) if REQUEST is not None: - self.REQUEST.RESPONSE.redirect('cache_tool_configure?portal_status_message=Cache updated.') + self.REQUEST.RESPONSE.redirect('cache_tool_configure?manage_tabs_message=Cache updated.') security.declareProtected(Permissions.ModifyPortalContent, 'clearCache') def clearCache(self, REQUEST=None): @@ -182,7 +182,7 @@ class CacheTool(BaseTool): for cp in ram_cache_root[cf].getCachePluginList(): cp.clearCache() if REQUEST is not None: - self.REQUEST.RESPONSE.redirect('cache_tool_configure?portal_status_message=Cache cleared.') + self.REQUEST.RESPONSE.redirect('cache_tool_configure?manage_tabs_message=Cache cleared.') security.declareProtected(Permissions.ModifyPortalContent, 'clearCacheFactory') def clearCacheFactory(self, cache_factory_id, REQUEST=None): @@ -191,7 +191,7 @@ class CacheTool(BaseTool): if ram_cache_root.has_key(cache_factory_id): ram_cache_root[cache_factory_id].clearCache() if REQUEST is not None: - self.REQUEST.RESPONSE.redirect('cache_tool_configure?portal_status_message=Cache factory %s cleared.' %cache_factory_id) + self.REQUEST.RESPONSE.redirect('cache_tool_configure?manage_tabs_message=Cache factory %s cleared.' %cache_factory_id) security.declareProtected(Permissions.ModifyPortalContent, 'clearCacheFactoryScope') def clearCacheFactoryScope(self, cache_factory_id, scope, REQUEST=None): @@ -200,5 +200,5 @@ class CacheTool(BaseTool): if ram_cache_root.has_key(cache_factory_id): ram_cache_root[cache_factory_id].clearCacheForScope(scope) if REQUEST is not None: - self.REQUEST.RESPONSE.redirect('cache_tool_configure?portal_status_message=Cache factory scope %s cleared.' %cache_factory_id) + self.REQUEST.RESPONSE.redirect('cache_tool_configure?manage_tabs_message=Cache factory scope %s cleared.' %cache_factory_id) diff --git a/product/ERP5Type/dtml/cache_tool_configure.dtml b/product/ERP5Type/dtml/cache_tool_configure.dtml index b5918ad154..3660752226 100644 --- a/product/ERP5Type/dtml/cache_tool_configure.dtml +++ b/product/ERP5Type/dtml/cache_tool_configure.dtml @@ -1,10 +1,6 @@ <dtml-var manage_page_header> <dtml-var manage_tabs> -<b><br/> - <dtml-var expr="REQUEST.get('portal_status_message', '')"> -</b> - <h3>Cache invalidation</h3> <form action="clearCache" method="POST"> <input type="submit" value="Clear all cache factories"/> -- 2.30.9