[Erp5-report] r29926 - in /erp5/trunk/products: CMFActivity/ ERP5/Tool/

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Oct 22 14:50:41 CEST 2009


Author: leonardo
Date: Thu Oct 22 14:50:41 2009
New Revision: 29926

URL: http://svn.erp5.org?rev=29926&view=rev
Log:
Make sure skins are setup on timerserver calls (approved by jm) CMFActivity/ActivityTool.py ERP5/Tool/AlarmTool.py

Modified:
    erp5/trunk/products/CMFActivity/ActivityTool.py
    erp5/trunk/products/ERP5/Tool/AlarmTool.py

Modified: erp5/trunk/products/CMFActivity/ActivityTool.py
URL: http://svn.erp5.org/erp5/trunk/products/CMFActivity/ActivityTool.py?rev=29926&r1=29925&r2=29926&view=diff
==============================================================================
--- erp5/trunk/products/CMFActivity/ActivityTool.py [utf8] (original)
+++ erp5/trunk/products/CMFActivity/ActivityTool.py [utf8] Thu Oct 22 14:50:41 2009
@@ -856,6 +856,12 @@
         if not acquired:
           return
 
+        # make sure our skin is set-up. On CMF 1.5 it's setup by acquisition,
+        # but on 2.2 it's by traversal, and our site probably wasn't traversed
+        # by the timerserver request, which goes into the Zope Control_Panel
+        # calling it a second time is a harmless and cheap no-op.
+        # both setupCurrentSkin and REQUEST are acquired from containers.
+        self.setupCurrentSkin(self.REQUEST)
         try:
           old_sm = getSecurityManager()
           try:

Modified: erp5/trunk/products/ERP5/Tool/AlarmTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/AlarmTool.py?rev=29926&r1=29925&r2=29926&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/AlarmTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/AlarmTool.py [utf8] Thu Oct 22 14:50:41 2009
@@ -205,6 +205,12 @@
     acquired = last_tic_lock.acquire(0)
     if not acquired:
       return
+    # make sure our skin is set-up. On CMF 1.5 it's setup by acquisition,
+    # but on 2.2 it's by traversal, and our site probably wasn't traversed
+    # by the timerserver request, which goes into the Zope Control_Panel
+    # calling it a second time is a harmless and cheap no-op.
+    # both setupCurrentSkin and REQUEST are acquired from containers.
+    self.setupCurrentSkin(self.REQUEST)
     try:
       # only start when we are the alarmNode
       alarmNode = self.getAlarmNode()




More information about the Erp5-report mailing list