[CMF-checkins] CVS: CMF/CMFCore - CatalogTool.py:1.27
Tres Seaver
tseaver@zope.com
Sun, 30 Jun 2002 18:29:34 -0400
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv27781/CMFCore
Modified Files:
CatalogTool.py
Log Message:
- Make CMF's catalog independent of any indexes or metadata created by
default on the catalog. This change allows the same code to run
under both Zope 2.5 and Zope 2.6 (2.6 catalogs do not create any
indexes or schema by default).
=== CMF/CMFCore/CatalogTool.py 1.26 => 1.27 ===
, ('in_reply_to', 'FieldIndex')
, ('meta_type', 'FieldIndex')
+ , ('id', 'FieldIndex')
)
security.declarePublic( 'enumerateColumns' )
@@ -161,10 +162,13 @@
addColumn = self._catalog.addColumn
# Content indexes
+ self._catalog.indexes.clear()
for index_name, index_type in self.enumerateIndexes():
addIndex( index_name, index_type )
# Cached metadata
+ self._catalog.names = ()
+ self._catalog.schema.clear()
for column_name in self.enumerateColumns():
addColumn( column_name )