Commit 050e77d5 authored by Jim Fulton's avatar Jim Fulton

Changed undo interface to use the global undo manager. This provides a hook

for playing with and eventually incorporating multi-database undo facilities.
parent 138e6410
...@@ -85,8 +85,8 @@ ...@@ -85,8 +85,8 @@
__doc__='''short description __doc__='''short description
$Id: Undo.py,v 1.17 1999/11/24 12:12:29 jim Exp $''' $Id: Undo.py,v 1.18 1999/12/02 00:43:34 jim Exp $'''
__version__='$Revision: 1.17 $'[11:-2] __version__='$Revision: 1.18 $'[11:-2]
import Globals, ExtensionClass import Globals, ExtensionClass
from DateTime import DateTime from DateTime import DateTime
...@@ -141,9 +141,9 @@ class UndoSupport(ExtensionClass.Base): ...@@ -141,9 +141,9 @@ class UndoSupport(ExtensionClass.Base):
'last_transaction', 'last_transaction',
first_transaction+PrincipiaUndoBatchSize) first_transaction+PrincipiaUndoBatchSize)
db=self._p_jar.db r=Globals.UndoManager.undoInfo(
r=db().undoInfo(first_transaction, last_transaction, first_transaction, last_transaction,
{'user_name': Prefix(path)}) {'user_name': Prefix(path)})
for d in r: d['time']=DateTime(d['time']) for d in r: d['time']=DateTime(d['time'])
...@@ -152,9 +152,7 @@ class UndoSupport(ExtensionClass.Base): ...@@ -152,9 +152,7 @@ class UndoSupport(ExtensionClass.Base):
def manage_undo_transactions(self, transaction_info, REQUEST=None): def manage_undo_transactions(self, transaction_info, REQUEST=None):
""" """
""" """
jar=self._p_jar undo=Globals.UndoManager.undo
db=jar.db
undo=db().undo
for i in transaction_info: undo(i) for i in transaction_info: undo(i)
......
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