SVN: Zope/trunk/ Restore ability to undo multiple transactions from the ZMI by using the `undoMultiple` API.

Hanno Schlichting <[email protected]>
Newsgroups gmane.comp.web.zope.cvs
Message-ID <20110703153835.31512940C9__32817.7813128152$1309707529$gmane$org@cvs.zope.org>
Log message for revision 122087:
  Restore ability to undo multiple transactions from the ZMI by using the `undoMultiple` API.
  

Changed:
  U   Zope/trunk/doc/CHANGES.rst
  U   Zope/trunk/src/App/Undo.py

-=-
Modified: Zope/trunk/doc/CHANGES.rst
===================================================================
--- Zope/trunk/doc/CHANGES.rst	2011-07-03 15:24:47 UTC (rev 122086)
+++ Zope/trunk/doc/CHANGES.rst	2011-07-03 15:38:34 UTC (rev 122087)
@@ -11,6 +11,9 @@
 Bugs Fixed
 ++++++++++
 
+- Restore ability to undo multiple transactions from the ZMI by using the
+  `undoMultiple` API.
+
 - Made sure getConfiguration().default_zpublisher_encoding is set correctly.
 
 Features Added

Modified: Zope/trunk/src/App/Undo.py
===================================================================
--- Zope/trunk/src/App/Undo.py	2011-07-03 15:24:47 UTC (rev 122086)
+++ Zope/trunk/src/App/Undo.py	2011-07-03 15:38:34 UTC (rev 122087)
@@ -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'])

_______________________________________________
Zope-Checkins maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-checkins
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.