[CMF-checkins] SVN: CMF/branches/2.1/CMFCore/PortalObject.py -
added temporary hack for upgrading site instances created
with CMF 2.1 beta
Yvo Schubbe
y.2007- at wcm-solutions.de
Fri Jun 29 06:11:36 EDT 2007
Log message for revision 77232:
- added temporary hack for upgrading site instances created with CMF 2.1 beta
Changed:
U CMF/branches/2.1/CMFCore/PortalObject.py
-=-
Modified: CMF/branches/2.1/CMFCore/PortalObject.py
===================================================================
--- CMF/branches/2.1/CMFCore/PortalObject.py 2007-06-29 10:04:10 UTC (rev 77231)
+++ CMF/branches/2.1/CMFCore/PortalObject.py 2007-06-29 10:11:35 UTC (rev 77232)
@@ -16,6 +16,7 @@
"""
from five.localsitemanager import find_next_sitemanager
+from five.localsitemanager.registry import FiveVerifyingAdapterLookup
from five.localsitemanager.registry import PersistentComponents
from Globals import InitializeClass
from Products.Five.component.interfaces import IObjectManagerSite
@@ -61,12 +62,22 @@
def getSiteManager(self):
if self._components is None:
+ # BBB: for CMF 2.0 instances
next = find_next_sitemanager(self)
if next is None:
next = base
name = '/'.join(self.getPhysicalPath())
self._components = PersistentComponents(name, (next,))
self._components.__parent__ = self
+ elif self._components.utilities.LookupClass \
+ != FiveVerifyingAdapterLookup:
+ # BBB: for CMF 2.1 beta instances
+ # XXX: should be removed again after the CMF 2.1 beta2 release
+ self._components.utilities.LookupClass \
+ = FiveVerifyingAdapterLookup
+ self._components.utilities._createLookup()
+ self._components.utilities.__parent__ = self._components
+ self._components.__parent__ = self
return self._components
def __before_publishing_traverse__(self, arg1, arg2=None):
More information about the CMF-checkins
mailing list