Back to index

plone3  3.1.7
undo.py
Go to the documentation of this file.
00001 ##parameters=transaction_info
00002 ##title=Undo transactions
00003 ##
00004 from Products.CMFCore.utils import getUtilityByInterfaceName
00005 from Products.CMFDefault.utils import Message as _
00006 
00007 utool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IUndoTool')
00008 
00009 utool.undo(context, transaction_info)
00010 
00011 context.setStatus(True, _(u'Transaction(s) undone.'))
00012 context.setRedirect(context, 'object/folderContents')