From 134afce3c7d900439de42bf8818422e8edbea01e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Pin?= Date: Wed, 3 Jul 2013 13:32:38 +0200 Subject: [PATCH] =?utf8?q?Le=20tri=20sur=20l'index=20'position'=20peut=20f?= =?utf8?q?outre=20la=20zone=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Folder.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Folder.py b/Folder.py index 76d4ee1..e36dec8 100644 --- a/Folder.py +++ b/Folder.py @@ -54,6 +54,7 @@ from Products.CMFCore.permissions import ListFolderContents, View, ViewManagemen ManagePortal, ModifyPortalContent from permissions import DeletePortalContents, DeleteObjects, DeleteOwnedObjects, SetLocalRoles, CheckMemberPermission from Products.CMFCore.utils import _checkPermission, getToolByName +from Products.CMFCore.utils import getUtilityByInterfaceName from Products.CMFCore.CMFCatalogAware import CMFCatalogAware from Products.CMFCore.PortalFolder import PortalFolder, ContentFilter from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl @@ -268,10 +269,15 @@ class PlinnFolder(CMFCatalogAware, PortalFolder, DefaultDublinCoreImpl) : """ query catalog and returns brains of contents. Requires ExtendedPathIndex """ - ctool = getToolByName(self, 'portal_catalog') + #ctool = getToolByName(self, 'portal_catalog') + ctool = getUtilityByInterfaceName('Products.CMFCore.interfaces.ICatalogTool') + #print ctool.absolute_url() contentFilter['path'] = {'query':'/'.join(self.getPhysicalPath()), 'depth':1} - return ctool(sort_on='position', **contentFilter) + try : + return ctool(sort_on='position', **contentFilter) + except : + return ctool(**contentFilter) security.declarePublic('synContentValues') -- 2.20.1