logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

CVS: Products/CMFCore - CatalogTool.py:1.25: msg#00016

Subject: CVS: Products/CMFCore - CatalogTool.py:1.25
Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv4617

Modified Files:
        CatalogTool.py 
Log Message:
Now creates a Vocabulary for itself if ZCatalog doesn't


=== Products/CMFCore/CatalogTool.py 1.24 => 1.25 ===
     def __init__(self):
         ZCatalog.__init__(self, self.getId())
+        
+        if not hasattr(self, 'Vocabulary'):
+            # As of 2.6, the Catalog no longer adds a vocabulary in itself
+            from Products.PluginIndexes.TextIndex.Vocabulary import Vocabulary
+            vocabulary = Vocabulary('Vocabulary', 'Vocabulary', globbing=1)
+            self._setObject('Vocabulary', vocabulary)
+            
         self._initIndexes()
 
     #






<Prev in Thread] Current Thread [Next in Thread>