Commit 8613d64c authored by Jens Vagelpohl's avatar Jens Vagelpohl

- LP #142535: Fix faulty docstring for manage_changeProperties which

  incorrectly suggested that passing a simple dictionary as REQUEST
  argument was supported.
parent a4204321
...@@ -181,6 +181,10 @@ Features Added ...@@ -181,6 +181,10 @@ Features Added
Bugs Fixed Bugs Fixed
++++++++++ ++++++++++
- LP #142535: Fix faulty docstring for manage_changeProperties which
incorrectly suggested that passing a simple dictionary as REQUEST
argument was supported.
- LP #374818: Use module-provided functions as opposed to the old - LP #374818: Use module-provided functions as opposed to the old
"folder methods" when creating folders and user folders in "folder methods" when creating folders and user folders in
ZopeTestCase. ZopeTestCase.
......
...@@ -316,8 +316,8 @@ class PropertyManager(Base, ElementWithAttributes): ...@@ -316,8 +316,8 @@ class PropertyManager(Base, ElementWithAttributes):
def manage_changeProperties(self, REQUEST=None, **kw): def manage_changeProperties(self, REQUEST=None, **kw):
"""Change existing object properties. """Change existing object properties.
Change object properties by passing either a mapping object Change object properties by passing either a REQUEST object or
of name:value pairs {'foo':6} or passing name=value parameters name=value parameters
""" """
if REQUEST is None: if REQUEST is None:
props={} props={}
......
...@@ -441,9 +441,11 @@ class PropertySheet(Traversable, Persistent, Implicit): ...@@ -441,9 +441,11 @@ class PropertySheet(Traversable, Persistent, Implicit):
security.declareProtected(manage_properties, 'manage_changeProperties') security.declareProtected(manage_properties, 'manage_changeProperties')
def manage_changeProperties(self, REQUEST=None, **kw): def manage_changeProperties(self, REQUEST=None, **kw):
"""Change existing object properties by passing either a mapping """Change existing object properties.
object of name:value pairs {'foo':6} or passing name=value
parameters.""" Change object properties by passing either a REQUEST object or
name=value parameters
"""
if REQUEST is None: if REQUEST is None:
props={} props={}
else: props=REQUEST else: props=REQUEST
......
...@@ -797,8 +797,8 @@ class IPropertyManager(Interface): ...@@ -797,8 +797,8 @@ class IPropertyManager(Interface):
def manage_changeProperties(REQUEST=None, **kw): def manage_changeProperties(REQUEST=None, **kw):
"""Change existing object properties. """Change existing object properties.
Change object properties by passing either a mapping object Change object properties by passing either a REQUEST object or
of name:value pairs {'foo':6} or passing name=value parameters name=value parameters
""" """
def manage_changePropertyTypes(old_ids, props, REQUEST=None): def manage_changePropertyTypes(old_ids, props, REQUEST=None):
......
...@@ -165,9 +165,8 @@ class PropertySheet: ...@@ -165,9 +165,8 @@ class PropertySheet:
def manage_changeProperties(REQUEST=None, **kw): def manage_changeProperties(REQUEST=None, **kw):
""" """
Change existing object properties by passing either a mapping Change object properties by passing either a REQUEST object or
object as 'REQUEST' containing name:value pairs or by passing name=value parameters
name=value keyword arguments.
Some objects have "special" properties defined by product Some objects have "special" properties defined by product
authors that cannot be changed. If you try to change one of authors that cannot be changed. If you try to change one of
...@@ -178,7 +177,7 @@ class PropertySheet: ...@@ -178,7 +177,7 @@ class PropertySheet:
ensure that the updated values are of the correct type. ensure that the updated values are of the correct type.
*This should probably change*. *This should probably change*.
If a value is provided for 'REQUEST' (as it will be when If a REQUEST object is passed (as it will be when
called via the web), the method will return an HTML message called via the web), the method will return an HTML message
dialog. If no REQUEST is passed, the method returns 'None' on dialog. If no REQUEST is passed, the method returns 'None' on
success. success.
......
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