[CMF-checkins] CVS: CMF/CMFCore - CatalogTool.py:1.49 PortalFolder.py:1.52 TypesTool.py:1.64

Yvo Schubbe schubbe at web.de
Tue Dec 23 16:47:54 EST 2003


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv21105/CMFCore

Modified Files:
	CatalogTool.py PortalFolder.py TypesTool.py 
Log Message:
Merged yuppie-collector025-branch:
- Creator element no longer depends on Ownership. (Collector #25)
- TypeInfo's _finishConstruction() now calls reindexObject().
- Removed WorkflowMethod wrapper of Document.setFormat().


=== CMF/CMFCore/CatalogTool.py 1.48 => 1.49 ===
--- CMF/CMFCore/CatalogTool.py:1.48	Sun Dec  7 15:27:28 2003
+++ CMF/CMFCore/CatalogTool.py	Tue Dec 23 16:47:23 2003
@@ -108,11 +108,13 @@
     def enumerateIndexes( self ):
         #   Return a list of ( index_name, type ) pairs for the initial
         #   index set.
-        #   id is depricated and may go away, use getId!
+        #   id is deprecated and may go away, use getId!
+        #   Creator is deprecated and may go away, use listCreators!
         return ( ('Title', 'TextIndex')
                , ('Subject', 'KeywordIndex')
                , ('Description', 'TextIndex')
                , ('Creator', 'FieldIndex')
+               , ('listCreators', 'KeywordIndex')
                , ('SearchableText', 'TextIndex')
                , ('Date', 'FieldIndex')
                , ('Type', 'FieldIndex')
@@ -133,13 +135,15 @@
     security.declarePublic( 'enumerateColumns' )
     def enumerateColumns( self ):
         #   Return a sequence of schema names to be cached.
-        #   id is depricated and may go away, use getId!
+        #   id is deprecated and may go away, use getId!
+        #   Creator is deprecated and may go away, use listCreators!
         return ( 'Subject'
                , 'Title'
                , 'Description'
                , 'Type'
                , 'review_state'
                , 'Creator'
+               , 'listCreators'
                , 'Date'
                , 'getIcon'
                , 'created'


=== CMF/CMFCore/PortalFolder.py 1.51 => 1.52 ===
--- CMF/CMFCore/PortalFolder.py:1.51	Sun Dec  7 15:44:05 2003
+++ CMF/CMFCore/PortalFolder.py	Tue Dec 23 16:47:23 2003
@@ -492,6 +492,7 @@
         Represent a predicate against a content object's metadata.
     """
     MARKER = []
+    filterCreator = []
     filterSubject = []
     def __init__( self
                 , Title=MARKER
@@ -515,9 +516,10 @@
                                       pat.search( x.Title() ) )
             self.description.append( 'Title: %s' % Title )
 
-        if Creator is not self.MARKER:
-            self.predicates.append( lambda x, pat=re.compile( Creator ):
-                                      pat.search( x.Creator() ) )
+        if Creator and Creator is not self.MARKER:
+            self.filterCreator = Creator
+            self.predicates.append( lambda x, creator=self.filterCreator:
+                                    creator in x.listCreators() )
             self.description.append( 'Creator: %s' % Creator )
 
         if Subject and Subject is not self.MARKER:


=== CMF/CMFCore/TypesTool.py 1.63 => 1.64 ===
--- CMF/CMFCore/TypesTool.py:1.63	Thu Nov 27 10:06:49 2003
+++ CMF/CMFCore/TypesTool.py	Tue Dec 23 16:47:23 2003
@@ -327,11 +327,11 @@
         """
         if hasattr(ob, '_setPortalTypeName'):
             ob._setPortalTypeName(self.getId())
-            ob.reindexObject(idxs=['portal_type', 'Type'])
 
         if hasattr(aq_base(ob), 'notifyWorkflowCreated'):
             ob.notifyWorkflowCreated()
 
+        ob.reindexObject()
         return ob
 
     security.declareProtected(ManagePortal, 'getMethodAliases')




More information about the CMF-checkins mailing list