Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
b1d22047
Commit
b1d22047
authored
Dec 12, 2011
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn `UndoSupport.get_request_var_or_attr` helper into a private API.
parent
ca018bfd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
doc/CHANGES.rst
doc/CHANGES.rst
+2
-0
src/App/Undo.py
src/App/Undo.py
+4
-4
src/App/interfaces.py
src/App/interfaces.py
+0
-4
No files found.
doc/CHANGES.rst
View file @
b1d22047
...
@@ -8,6 +8,8 @@ http://docs.zope.org/zope2/releases/.
...
@@ -8,6 +8,8 @@ http://docs.zope.org/zope2/releases/.
2.12.21 (unreleased)
2.12.21 (unreleased)
--------------------
--------------------
- Turn `UndoSupport.get_request_var_or_attr` helper into a private API.
- Provide security declarations for `BTreeFolder2Base` class, instead of only
- Provide security declarations for `BTreeFolder2Base` class, instead of only
for `BTreeFolder2` via the `OFS.Folder` mix-in.
for `BTreeFolder2` via the `OFS.Folder` mix-in.
...
...
src/App/Undo.py
View file @
b1d22047
...
@@ -50,7 +50,7 @@ class UndoSupport(ExtensionClass.Base):
...
@@ -50,7 +50,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
):
...
@@ -74,15 +74,15 @@ class UndoSupport(ExtensionClass.Base):
...
@@ -74,15 +74,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
)
...
...
src/App/interfaces.py
View file @
b1d22047
...
@@ -59,10 +59,6 @@ class IUndoSupport(Interface):
...
@@ -59,10 +59,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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment