Commit 2156ca03 authored by Nicolas Dumazet's avatar Nicolas Dumazet

revert r38206: wrong commit message, unnecessary changes.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38240 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0bb53948
No related merge requests found
......@@ -39,7 +39,7 @@ from AccessControl.Permission import pname, Permission
from AccessControl.PermissionRole import rolesForPermissionOn
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.ZopeGuards import guarded_getattr
from Acquisition import aq_base, aq_inner, aq_acquire, aq_chain, aq_parent
from Acquisition import aq_base, aq_inner, aq_acquire, aq_chain
import OFS.History
from OFS.SimpleItem import SimpleItem
from OFS.PropertyManager import PropertyManager
......@@ -549,7 +549,7 @@ def initializePortalTypeDynamicProperties(self, klass, ptype, aq_key, portal):
# Mark as generated
prop_holder = PropertyHolder()
# Recurse to parent object
parent_object = aq_parent(aq_inner(self))
parent_object = self.aq_inner.aq_parent
parent_klass = parent_object.__class__
parent_type = parent_object.portal_type
if getattr(parent_klass, 'isRADContent', 0) and \
......@@ -922,7 +922,7 @@ class Base( CopyContainer,
# Iterate until an ERP5 Site is obtained.
portal = self.getPortalObject()
while portal.portal_type != 'ERP5 Site':
portal = aq_inner(aq_parent(portal)).getPortalObject()
portal = portal.aq_parent.aq_inner.getPortalObject()
# Generate portal_type methods
if aq_key not in Base.aq_portal_type:
......@@ -1702,7 +1702,7 @@ class Base( CopyContainer,
changes id of an object by calling the Zope machine
"""
tryMethodCallWithTemporaryPermission(self, 'Copy or Move',
aq_parent(aq_inner(self)).manage_renameObject, (self.id, id), {}, CopyError)
self.aq_inner.aq_parent.manage_renameObject, (self.id, id), {}, CopyError)
# Do not flush any more, because it generates locks
security.declareProtected( Permissions.ModifyPortalContent,
......@@ -1812,7 +1812,7 @@ class Base( CopyContainer,
for the implementation of the ZSQLCatalog based listing
of objects.
"""
return aq_parent(aq_inner(self)).getUid()
return self.aq_inner.aq_parent.getUid()
security.declareProtected( Permissions.AccessContentsInformation,
'getParentTitleOrId' )
......@@ -1820,7 +1820,7 @@ class Base( CopyContainer,
"""
Returns the title or the id of the parent
"""
return aq_parent(aq_inner(self)).getTitleOrId()
return self.aq_inner.aq_parent.getTitleOrId()
security.declareProtected( Permissions.AccessContentsInformation,
'getParentRelativeUrl' )
......@@ -1828,7 +1828,7 @@ class Base( CopyContainer,
"""
Returns the title or the id of the parent
"""
return aq_parent(aq_inner(self)).getRelativeUrl()
return self.aq_inner.aq_parent.getRelativeUrl()
security.declareProtected( Permissions.AccessContentsInformation,
'getParentId' )
......@@ -1836,7 +1836,7 @@ class Base( CopyContainer,
"""
Returns the id of the parent
"""
return aq_parent(aq_inner(self)).getId()
return self.aq_inner.aq_parent.getId()
security.declareProtected( Permissions.AccessContentsInformation,
'getParentTitle' )
......@@ -1844,7 +1844,7 @@ class Base( CopyContainer,
"""
Returns the title or of the parent
"""
return aq_parent(aq_inner(self)).getTitle()
return self.aq_inner.aq_parent.getTitle()
security.declareProtected( Permissions.AccessContentsInformation,
'getParentValue' )
......@@ -1852,7 +1852,7 @@ class Base( CopyContainer,
"""
Returns the parent of the current object.
"""
return aq_parent(aq_inner(self))
return self.aq_inner.aq_parent
security.declareProtected( Permissions.AccessContentsInformation, 'getParent' )
def getParent(self):
......@@ -1938,7 +1938,7 @@ class Base( CopyContainer,
"""
Returns the portal object
"""
return aq_parent(aq_inner(self)).getPortalObject()
return self.aq_inner.aq_parent.getPortalObject()
security.declareProtected(Permissions.AccessContentsInformation, 'getWorkflowIds')
def getWorkflowIds(self):
......@@ -2817,7 +2817,7 @@ class Base( CopyContainer,
'recursiveReindexObject', 'activate', 'setUid'):
setattr(context, k, getattr(temp_object, k))
# Return result
return context.__of__(aq_parent(self))
return context.__of__(self.aq_parent)
else:
return context.asContext(REQUEST=REQUEST, **kw)
......
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