Commit dd44b034 authored by 's avatar

Merged fixes to use Acquistion.aq_base from 2.2 branch

parent 866320f5
......@@ -84,7 +84,7 @@
##############################################################################
"""Property management"""
__version__='$Revision: 1.30 $'[11:-2]
__version__='$Revision: 1.31 $'[11:-2]
import ExtensionClass, Globals
import ZDOM
......@@ -93,7 +93,7 @@ from ZPublisher.Converters import type_converters
from Globals import HTMLFile, MessageDialog
from string import find,join,lower,split
from DocumentTemplate import html_quote
from Acquisition import Implicit
from Acquisition import Implicit, aq_base
from Globals import Persistent
from DateTime import DateTime
......@@ -196,7 +196,7 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes):
def valid_property_id(self, id):
if not id or id[:1]=='_' or (' ' in id) \
or hasattr(self.aq_base, id):
or hasattr(aq_base(self), id):
return 0
return 1
......@@ -386,7 +386,7 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes):
propdict=self.propdict()
nd=self._reserved_names
for id in ids:
if not hasattr(self.aq_base, id):
if not hasattr(aq_base(self), id):
raise 'BadRequest', (
'The property <em>%s</em> does not exist' % id)
if (not 'd' in propdict[id].get('mode', 'wd')) or (id in nd):
......
......@@ -84,7 +84,7 @@
##############################################################################
"""Property sheets"""
__version__='$Revision: 1.56 $'[11:-2]
__version__='$Revision: 1.57 $'[11:-2]
import time, string, App.Management, Globals
from ZPublisher.Converters import type_converters
......@@ -97,6 +97,7 @@ from webdav.common import urlbase
from ExtensionClass import Base
from Globals import Persistent
from Traversable import Traversable
from Acquisition import aq_base
class View(App.Management.Tabs, Base):
"""A view of an object, typically used for management purposes
......@@ -780,8 +781,3 @@ def absattr(attr):
if callable(attr):
return attr()
return attr
def aq_base(ob):
if hasattr(ob, 'aq_base'):
return ob.aq_base
return ob
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