Commit 78781655 authored by Jérome Perrin's avatar Jérome Perrin

do not redirect when not called trought the web



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11230 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0302f999
......@@ -350,7 +350,7 @@ class ActivityTool (Folder, UniqueObject):
return False
security.declareProtected(Permissions.manage_properties, 'subscribe')
def subscribe(self):
def subscribe(self, REQUEST=None, RESPONSE=None):
""" subscribe to the global Timer Service """
service = getTimerService(self)
url = '%s/manageLoadBalancing?manage_tabs_message=' %self.absolute_url()
......@@ -360,7 +360,8 @@ class ActivityTool (Folder, UniqueObject):
else:
service.subscribe(self)
url += urllib.quote("Subscribed to Timer Service")
return self.REQUEST.RESPONSE.redirect(url)
if RESPONSE is not None:
RESPONSE.redirect(url)
security.declareProtected(Permissions.manage_properties, 'unsubscribe')
def unsubscribe(self, REQUEST=None, RESPONSE=None):
......
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