From: Vincent F. <svn...@pl...> - 2009-07-28 13:26:55
|
Author: vincentfretin Date: Tue Jul 28 13:26:48 2009 New Revision: 28244 Modified: Plone/branches/4.0/ (props changed) Plone/branches/4.0/Products/CMFPlone/ (props changed) Plone/branches/4.0/Products/CMFPlone/CatalogTool.py Log: Revert r28237 Modified: Plone/branches/4.0/Products/CMFPlone/CatalogTool.py ============================================================================== --- Plone/branches/4.0/Products/CMFPlone/CatalogTool.py (original) +++ Plone/branches/4.0/Products/CMFPlone/CatalogTool.py Tue Jul 28 13:26:48 2009 @@ -32,8 +32,6 @@ from Products.CMFPlone.interfaces import IPloneCatalogTool from OFS.interfaces import IOrderedContainer -from OFS.IOrderSupport import IOrderedContainer as z2IOrderedContainer -from ZODB.POSException import ConflictError from Products.ZCatalog.ZCatalog import ZCatalog @@ -114,14 +112,9 @@ 0 """ parent = aq_parent(aq_inner(obj)) - if IOrderedContainer.providedBy(parent) or z2IOrderedContainer.implementedBy(parent): - try: - return parent.getObjectPosition(obj.getId()) - except ConflictError: - raise - except: - pass - # XXX log + ordered = IOrderedContainer(parent, None) + if ordered is not None: + return ordered.getObjectPosition(obj.getId()) return 0 SIZE_CONST = {'kB': 1024, 'MB': 1024*1024, 'GB': 1024*1024*1024} |