[CMF-checkins] SVN: CMF/trunk/CMFCore/UndoTool.py - merged r74161
from 2.1 branch
Yvo Schubbe
y.2007- at wcm-solutions.de
Sun Jun 24 03:43:30 EDT 2007
Log message for revision 76999:
- merged r74161 from 2.1 branch
Changed:
U CMF/trunk/CMFCore/UndoTool.py
-=-
Modified: CMF/trunk/CMFCore/UndoTool.py
===================================================================
--- CMF/trunk/CMFCore/UndoTool.py 2007-06-24 00:27:38 UTC (rev 76998)
+++ CMF/trunk/CMFCore/UndoTool.py 2007-06-24 07:43:28 UTC (rev 76999)
@@ -19,9 +19,11 @@
from Globals import DTMLFile
from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
+from zope.component import queryUtility
from zope.interface import implements
from exceptions import AccessControl_Unauthorized
+from interfaces import ISiteRoot
from interfaces import IUndoTool
from permissions import ListUndoableChanges
from permissions import ManagePortal
@@ -66,7 +68,11 @@
'''Lists all transaction IDs the user is allowed to undo.
'''
# arg list for undoable_transactions() changed in Zope 2.2.
- portal = self.aq_inner.aq_parent
+ portal = queryUtility(ISiteRoot)
+ if portal is None:
+ # fallback
+ portal = self.aq_inner.aq_parent
+
transactions = portal.undoable_transactions(
first_transaction=first_transaction,
last_transaction=last_transaction,
More information about the CMF-checkins
mailing list