[Zope-Checkins] SVN: Zope/branches/2.13/ Restore ability to undo multiple transactions from the ZMI.
Stefan H. Holek
stefan at epy.co.at
Wed Jul 13 05:31:49 EDT 2011
Log message for revision 122167:
Restore ability to undo multiple transactions from the ZMI.
Changed:
U Zope/branches/2.13/doc/CHANGES.rst
U Zope/branches/2.13/src/App/Undo.py
-=-
Modified: Zope/branches/2.13/doc/CHANGES.rst
===================================================================
--- Zope/branches/2.13/doc/CHANGES.rst 2011-07-13 09:28:26 UTC (rev 122166)
+++ Zope/branches/2.13/doc/CHANGES.rst 2011-07-13 09:31:48 UTC (rev 122167)
@@ -8,6 +8,15 @@
2.13.9 (unreleased)
-------------------
+Bugs Fixed
+++++++++++
+
+- Restore ability to undo multiple transactions from the ZMI by using the
+ `undoMultiple` API. Backported from trunk (r122087).
+
+Features Added
+++++++++++++++
+
- Updated distributions:
- Products.ZCatalog = 2.13.15
Modified: Zope/branches/2.13/src/App/Undo.py
===================================================================
--- Zope/branches/2.13/src/App/Undo.py 2011-07-13 09:28:26 UTC (rev 122166)
+++ Zope/branches/2.13/src/App/Undo.py 2011-07-13 09:31:48 UTC (rev 122167)
@@ -132,15 +132,16 @@
def manage_undo_transactions(self, transaction_info=(), REQUEST=None):
"""
"""
- undo=self._p_jar.db().undo
-
+ tids = {}
for tid in transaction_info:
- tid=tid.split()
+ tid = tid.split()
if tid:
- transaction.get().note("Undo %s" % ' '.join(tid[1:]))
- tid=decode64(tid[0])
- undo(tid)
+ tids[decode64(tid[0])] = tid[-1]
+ if tids:
+ transaction.get().note("Undo %s" % ' '.join(tids.values()))
+ self._p_jar.db().undoMultiple(tids.keys())
+
if REQUEST is None:
return
REQUEST['RESPONSE'].redirect("%s/manage_UndoForm" % REQUEST['URL1'])
More information about the Zope-Checkins
mailing list