[CMF-checkins] CVS: CMF/CMFCore - CachingPolicyManager.py:1.12
Tres Seaver
tseaver at zope.com
Wed Mar 31 23:10:18 EST 2004
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv26726/CMFCore
Modified Files:
CachingPolicyManager.py
Log Message:
- Apply patch from Collector #234.
=== CMF/CMFCore/CachingPolicyManager.py 1.11 => 1.12 ===
--- CMF/CMFCore/CachingPolicyManager.py:1.11 Fri Jan 2 05:04:35 2004
+++ CMF/CMFCore/CachingPolicyManager.py Wed Mar 31 23:10:17 2004
@@ -278,7 +278,7 @@
, no_store # boolean (def. 0)
, must_revalidate # boolean (def. 0)
, vary # string value
- , REQUEST
+ , REQUEST=None
):
"""
Add a caching policy.
@@ -292,10 +292,12 @@
, must_revalidate
, vary
)
- REQUEST[ 'RESPONSE' ].redirect( self.absolute_url()
- + '/manage_cachingPolicies'
- + '?manage_tabs_message=Policy+added.'
- )
+ if REQUEST is not None:
+ REQUEST[ 'RESPONSE' ].redirect( self.absolute_url()
+ + '/manage_cachingPolicies'
+ + '?manage_tabs_message='
+ + 'Policy+added.'
+ )
security.declareProtected( ManagePortal, 'updatePolicy' )
def updatePolicy( self
@@ -307,7 +309,8 @@
, no_store # boolean (def. 0)
, must_revalidate # boolean (def. 0)
, vary
- , REQUEST ):
+ , REQUEST=None
+ ):
"""
Update a caching policy.
"""
@@ -320,13 +323,15 @@
, must_revalidate
, vary
)
- REQUEST[ 'RESPONSE' ].redirect( self.absolute_url()
- + '/manage_cachingPolicies'
- + '?manage_tabs_message=Policy+updated.'
- )
+ if REQUEST is not None:
+ REQUEST[ 'RESPONSE' ].redirect( self.absolute_url()
+ + '/manage_cachingPolicies'
+ + '?manage_tabs_message='
+ + 'Policy+updated.'
+ )
security.declareProtected( ManagePortal, 'movePolicyUp' )
- def movePolicyUp( self, policy_id, REQUEST ):
+ def movePolicyUp( self, policy_id, REQUEST=None ):
"""
Move a caching policy up in the list.
"""
@@ -337,13 +342,14 @@
else:
self._reorderPolicy( policy_id, ndx - 1 )
msg = "Policy+moved."
- REQUEST[ 'RESPONSE' ].redirect( self.absolute_url()
+ if REQUEST is not None:
+ REQUEST[ 'RESPONSE' ].redirect( self.absolute_url()
+ '/manage_cachingPolicies'
+ '?manage_tabs_message=%s' % msg
)
security.declareProtected( ManagePortal, 'movePolicyDown' )
- def movePolicyDown( self, policy_id, REQUEST ):
+ def movePolicyDown( self, policy_id, REQUEST=None ):
"""
Move a caching policy down in the list.
"""
@@ -354,18 +360,20 @@
else:
self._reorderPolicy( policy_id, ndx + 1 )
msg = "Policy+moved."
- REQUEST[ 'RESPONSE' ].redirect( self.absolute_url()
+ if REQUEST is not None:
+ REQUEST[ 'RESPONSE' ].redirect( self.absolute_url()
+ '/manage_cachingPolicies'
+ '?manage_tabs_message=%s' % msg
)
security.declareProtected( ManagePortal, 'removePolicy' )
- def removePolicy( self, policy_id, REQUEST ):
+ def removePolicy( self, policy_id, REQUEST=None ):
"""
Remove a caching policy.
"""
self._removePolicy( policy_id )
- REQUEST[ 'RESPONSE' ].redirect( self.absolute_url()
+ if REQUEST is not None:
+ REQUEST[ 'RESPONSE' ].redirect( self.absolute_url()
+ '/manage_cachingPolicies'
+ '?manage_tabs_message=Policy+removed.'
)
More information about the CMF-checkins
mailing list