Make sure skins are setup on timerserver calls (approved by jm)...

Make sure skins are setup on timerserver calls (approved by jm) CMFActivity/ActivityTool.py ERP5/Tool/AlarmTool.py

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29926 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 063abc89
......@@ -856,6 +856,12 @@ class ActivityTool (Folder, UniqueObject):
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:
......
......@@ -205,6 +205,12 @@ class AlarmTool(BaseTool):
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()
......
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