Commit e2d825ab authored by Hanno Schlichting's avatar Hanno Schlichting

Simplify signatures of new methods and allow them to work without a REQUEST

parent a9749a24
...@@ -1023,26 +1023,26 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -1023,26 +1023,26 @@ class ZCatalog(Folder, Persistent, Implicit):
security.declareProtected(manage_zcatalog_entries, security.declareProtected(manage_zcatalog_entries,
'manage_resetCatalogReport') 'manage_resetCatalogReport')
def manage_resetCatalogReport(self, REQUEST=None, RESPONSE=None, URL1=None): def manage_resetCatalogReport(self, REQUEST=None):
""" resets the catalog reports """ """ resets the catalog reports """
self._catalog.getCatalogReport().reset() self._catalog.getCatalogReport().reset()
if REQUEST and RESPONSE: if REQUEST is not None:
RESPONSE.redirect( REQUEST.response.redirect(REQUEST.URL1 +
URL1 +
'/manage_catalogReport?manage_tabs_message=Report%20cleared') '/manage_catalogReport?manage_tabs_message=Report%20cleared')
security.declareProtected(manage_zcatalog_entries, security.declareProtected(manage_zcatalog_entries,
'manage_editCatalogReport') 'manage_editCatalogReport')
def manage_editCatalogReport(self, RESPONSE, URL1, long_query_time=0.1, REQUEST=None): def manage_editCatalogReport(self, long_query_time=0.1, REQUEST=None):
""" edit the long query time """ """ edit the long query time """
if not isinstance(long_query_time, float): if not isinstance(long_query_time, float):
long_query_time = float(long_query_time) long_query_time = float(long_query_time)
self.long_query_time = long_query_time self.long_query_time = long_query_time
RESPONSE.redirect( if REQUEST is not None:
URL1 + '/manage_catalogReport?manage_tabs_message=Long%20query%20time%20changed') REQUEST.response.redirect(REQUEST.URL1 +
'/manage_catalogReport?manage_tabs_message=' +
'Long%20query%20time%20changed')
InitializeClass(ZCatalog) InitializeClass(ZCatalog)
......
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