[CMF-checkins] CVS: Products/CMFCore - CMFCatalogAware.py:1.29
Florent Guillaume
fg at nuxeo.com
Fri Apr 22 14:44:48 EDT 2005
Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv8282
Modified Files:
CMFCatalogAware.py
Log Message:
Use _unrestrictedGetObject when available, and LOG when the object
cannot be retrieved.
=== Products/CMFCore/CMFCatalogAware.py 1.28 => 1.29 ===
--- Products/CMFCore/CMFCatalogAware.py:1.28 Fri Apr 22 12:46:34 2005
+++ Products/CMFCore/CMFCatalogAware.py Fri Apr 22 14:44:48 2005
@@ -15,6 +15,7 @@
$Id$
"""
+from zLOG import LOG, PROBLEM
from AccessControl import ClassSecurityInfo
from Acquisition import aq_base
from ExtensionClass import Base
@@ -90,9 +91,16 @@
# Optimization in case of an indexable container
if brain_path == path:
continue
- ob = self.unrestrictedTraverse(brain_path, None)
+ # Get the object
+ if hasattr(aq_base(brain), '_unrestrictedGetObject'):
+ ob = brain._unrestrictedGetObject()
+ else:
+ # BBB older Zope
+ ob = self.unrestrictedTraverse(brain_path, None)
if ob is None:
# Ignore old references to deleted objects.
+ LOG('reindexObjectSecurity', PROBLEM,
+ "Cannot get %s from catalog" % brain_path)
continue
s = getattr(ob, '_p_changed', 0)
catalog.reindexObject(ob, idxs=['allowedRolesAndUsers'],
More information about the CMF-checkins
mailing list