optimization
This commit is contained in:
parent
7621246b46
commit
5047f404ce
|
@ -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
|
||||
|
|
Reference in New Issue