Commit 401b8edf authored by Hanno Schlichting's avatar Hanno Schlichting

Merge c123753 from 2.12 branch

parent 92c6eaf3
...@@ -47,7 +47,7 @@ class UndoSupport(ExtensionClass.Base): ...@@ -47,7 +47,7 @@ class UndoSupport(ExtensionClass.Base):
last_transaction=20, last_transaction=20,
) )
def get_request_var_or_attr(self, name, default): def _get_request_var_or_attr(self, name, default):
if hasattr(self, 'REQUEST'): if hasattr(self, 'REQUEST'):
REQUEST=self.REQUEST REQUEST=self.REQUEST
if REQUEST.has_key(name): if REQUEST.has_key(name):
...@@ -71,15 +71,15 @@ class UndoSupport(ExtensionClass.Base): ...@@ -71,15 +71,15 @@ class UndoSupport(ExtensionClass.Base):
PrincipiaUndoBatchSize=None): PrincipiaUndoBatchSize=None):
if first_transaction is None: if first_transaction is None:
first_transaction = self.get_request_var_or_attr( first_transaction = self._get_request_var_or_attr(
'first_transaction', 0) 'first_transaction', 0)
if PrincipiaUndoBatchSize is None: if PrincipiaUndoBatchSize is None:
PrincipiaUndoBatchSize = self.get_request_var_or_attr( PrincipiaUndoBatchSize = self._get_request_var_or_attr(
'PrincipiaUndoBatchSize', 20) 'PrincipiaUndoBatchSize', 20)
if last_transaction is None: if last_transaction is None:
last_transaction = self.get_request_var_or_attr( last_transaction = self._get_request_var_or_attr(
'last_transaction', 'last_transaction',
first_transaction+PrincipiaUndoBatchSize) first_transaction+PrincipiaUndoBatchSize)
......
...@@ -45,10 +45,6 @@ class IUndoSupport(Interface): ...@@ -45,10 +45,6 @@ class IUndoSupport(Interface):
manage_UndoForm = Attribute("""Manage Undo form""") manage_UndoForm = Attribute("""Manage Undo form""")
def get_request_var_or_attr(name, default):
"""
"""
def undoable_transactions(first_transaction=None, def undoable_transactions(first_transaction=None,
last_transaction=None, last_transaction=None,
PrincipiaUndoBatchSize=None): PrincipiaUndoBatchSize=None):
......
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