[Erp5-report] r9222 - /erp5/trunk/products/CMFActivity/ActivityTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Aug 16 09:53:59 CEST 2006


Author: jerome
Date: Wed Aug 16 09:53:58 2006
New Revision: 9222

URL: http://svn.erp5.org?rev=9222&view=rev
Log:

in unsuscribe, only redirect if we are called with a RESPONSE object (ie as a form action)


Modified:
    erp5/trunk/products/CMFActivity/ActivityTool.py

Modified: erp5/trunk/products/CMFActivity/ActivityTool.py
URL: http://svn.erp5.org/erp5/trunk/products/CMFActivity/ActivityTool.py?rev=9222&r1=9221&r2=9222&view=diff
==============================================================================
--- erp5/trunk/products/CMFActivity/ActivityTool.py (original)
+++ erp5/trunk/products/CMFActivity/ActivityTool.py Wed Aug 16 09:53:58 2006
@@ -363,7 +363,7 @@
         return self.REQUEST.RESPONSE.redirect(url)
 
     security.declareProtected(Permissions.manage_properties, 'unsubscribe')
-    def unsubscribe(self):
+    def unsubscribe(self, REQUEST=None, RESPONSE=None):
         """ unsubscribe from the global Timer Service """
         service = getTimerService(self)
         url = '%s/manageLoadBalancing?manage_tabs_message=' %self.absolute_url()
@@ -373,7 +373,8 @@
         else:
             service.unsubscribe(self)
             url += urllib.quote("Unsubscribed from Timer Service")
-        return self.REQUEST.RESPONSE.redirect(url)
+        if RESPONSE is not None:
+            RESPONSE.redirect(url)
 
     def manage_beforeDelete(self, item, container):
         self.unsubscribe()




More information about the Erp5-report mailing list