Commit 3d30efc1 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added support for historical

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9988 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 681ee1fc
...@@ -33,6 +33,8 @@ from AccessControl import ClassSecurityInfo ...@@ -33,6 +33,8 @@ from AccessControl import ClassSecurityInfo
from AccessControl.Permission import pname, Permission from AccessControl.Permission import pname, Permission
from Acquisition import aq_base, aq_inner, aq_acquire, aq_chain from Acquisition import aq_base, aq_inner, aq_acquire, aq_chain
from OFS.History import Historical
from Products.CMFCore.PortalContent import PortalContent from Products.CMFCore.PortalContent import PortalContent
from Products.CMFCore.Expression import Expression from Products.CMFCore.Expression import Expression
from Products.CMFCore.utils import getToolByName, _getViewFor from Products.CMFCore.utils import getToolByName, _getViewFor
...@@ -326,8 +328,7 @@ def initializePortalTypeDynamicWorkflowMethods(self, klass, prop_holder): ...@@ -326,8 +328,7 @@ def initializePortalTypeDynamicWorkflowMethods(self, klass, prop_holder):
method = WorkflowMethod(method, method_id) method = WorkflowMethod(method, method_id)
setattr(prop_holder, method_id, method) setattr(prop_holder, method_id, method)
class Base( CopyContainer, PortalContent, ActiveObject, Historical, ERP5PropertyManager ):
class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
""" """
This is the base class for all ERP5 Zope objects. This is the base class for all ERP5 Zope objects.
It defines object attributes which are necessary to implement It defines object attributes which are necessary to implement
...@@ -1208,16 +1209,16 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -1208,16 +1209,16 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
objectlist.append(objectlist[-1][element]) objectlist.append(objectlist[-1][element])
return '/' + join([object.getTitle() for object in objectlist[1:]], '/') return '/' + join([object.getTitle() for object in objectlist[1:]], '/')
security.declareProtected(Permissions.AccessContentsInformation, 'getPath') security.declareProtected(Permissions.AccessContentsInformation, 'getUrl')
def getPath(self, REQUEST=None): def getUrl(self, REQUEST=None):
""" """
Returns the absolute path of an object Returns the absolute path of an object
""" """
return join(self.getPhysicalPath(),'/') return join(self.getPhysicalPath(),'/')
# This should be the new name # Old name - for compatibility
security.declareProtected(Permissions.AccessContentsInformation, 'getUrl') security.declareProtected(Permissions.AccessContentsInformation, 'getPath')
getUrl = getPath getPath = getUrl
security.declareProtected(Permissions.AccessContentsInformation, 'getRelativeUrl') security.declareProtected(Permissions.AccessContentsInformation, 'getRelativeUrl')
def getRelativeUrl(self): def getRelativeUrl(self):
......
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