diff --git a/src/pfwbged/folder/folder.py b/src/pfwbged/folder/folder.py index a610c69..f467f03 100644 --- a/src/pfwbged/folder/folder.py +++ b/src/pfwbged/folder/folder.py @@ -11,11 +11,10 @@ from plone.dexterity.content import Container from Acquisition import aq_parent from plone.supermodel import model -from plone import api -from plone.uuid.interfaces import IUUID from plone.app.layout.viewlets.interfaces import IBelowContentBody import plone.app.contenttypes.interfaces from plone.dexterity.interfaces import IDexterityContainer +from plone.app.contentlisting.interfaces import IContentListingObject from pfwbged.collection.searchview import ResultsTable @@ -55,7 +54,6 @@ class FolderViewlet(grok.Viewlet): intids = component.getUtility(IIntIds) intid_catalog = component.getUtility(ICatalog) - portal_catalog = api.portal.get_tool('portal_catalog') try: intid = intids.getId(self.context) except KeyError: @@ -74,10 +72,6 @@ class FolderViewlet(grok.Viewlet): continue document = aq_parent(link) -# documents.append(document) - # this is stupid, getting back to the brain, but the rest of the - # stuff expects a brain, not an actual object. - uuid = IUUID(document, None) - documents.extend(portal_catalog.unrestrictedSearchResults({'UID': uuid})) + documents.append(IContentListingObject(document)) return documents