[CMF-checkins] CVS: CMF/CMFDefault/Extensions - update_catalogIndexes.py:1.2.4.1
Shane Hathaway
shane@cvs.zope.org
Wed, 20 Feb 2002 15:15:23 -0500
Update of /cvs-repository/CMF/CMFDefault/Extensions
In directory cvs.zope.org:/tmp/cvs-serv27999/CMFDefault/Extensions
Modified Files:
Tag: cmf-pre-1_3-branch
update_catalogIndexes.py
Log Message:
Merged changes from head, with a small change: the types tool does not need
to be extended in such a complex way. I took out the type_type registry and
the __bobo_traverse__ hook and replaced it with the original code with only
minor mods that give you the same extensibility without all the hacking.
(If anyone actually wants to use the extensibility, which I suspect no one
is actually interested in doing, I will happily provide instructions and
will create a corrected unit test.)
=== CMF/CMFDefault/Extensions/update_catalogIndexes.py 1.2 => 1.2.4.1 ===
-def update_catalogIndexes(self):
+def update_catalogIndexes(self, REQUEST):
'''
External method to drop, re-add, and rebuild catalog Indexes for migrated
CMF sites from Zope 2.3 to 2.4+.
@@ -11,5 +11,5 @@
ct = getToolByName(self, 'portal_catalog')
map(lambda x, ct=ct: ct.delIndex(x), rIndexes.keys())
map(lambda x, ct=ct: ct.addIndex(x[0], x[1]), rIndexes.items())
- ct.manage_reindexIndex(ids=rIndexes.keys())
+ ct.manage_reindexIndex(ids=rIndexes.keys(), REQUEST=REQUEST)
return 'Catalog Indexes rebuilt.'