Changeset 114
- Timestamp:
- 12/26/05 04:09:22
- Files:
-
- qTopic/branches/plone2.1/qTopic.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qTopic/branches/plone2.1/qTopic.py
r113 r114 121 121 allowed = DisplayList(flat) 122 122 return allowed 123 123 """ 124 124 security.declareProtected(ChangeTopics, "listFields") 125 125 def listFields(self): 126 """Return a list of fields from portal_catalog.127 """128 126 pcatalog = getToolByName( self, self.getCatalog() ) 129 127 available = pcatalog.indexes() … … 134 132 val.sort(lambda x,y: strcoll(self.translate(x),self.translate( y))) 135 133 return [(i, i, i)for i in val] 134 """ 135 security.declareProtected(ChangeTopics, "listFields") 136 def listFields(self): 137 """Return a list of fields from portal_catalog. 138 """ 139 tool = getToolByName(self, TOOLNAME) 140 return tool.getEnabledFields(catalog_name=self.geCatalog()) 136 141 137 142 security.declareProtected(ChangeTopics, 'listAvailableFields') … … 140 145 """ 141 146 return self.listFields() 147 148 security.declareProtected(View, 'listMetaDataFields') 149 def listMetaDataFields(self, exclude=True): 150 """Return a list of metadata fields from portal_catalog. 151 """ 152 tool = getToolByName(self, TOOLNAME) 153 return tool.getMetadataDisplay(exclude,catalog_name=self.geCatalog()) 142 154 143 155 security.declareProtected(CMFCorePermissions.View, "queryCatalog")
