[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog -
ZCatalog.py:1.121.2.4
Yvo Schubbe
cvs-admin at zope.org
Sun Dec 7 11:16:37 EST 2003
Update of /cvs-repository/Zope/lib/python/Products/ZCatalog
In directory cvs.zope.org:/tmp/cvs-serv31348/lib/python/Products/ZCatalog
Modified Files:
Tag: Zope-2_6-branch
ZCatalog.py
Log Message:
merged change from HEAD
=== Zope/lib/python/Products/ZCatalog/ZCatalog.py 1.121.2.3 => 1.121.2.4 ===
--- Zope/lib/python/Products/ZCatalog/ZCatalog.py:1.121.2.3 Tue Oct 7 15:43:24 2003
+++ Zope/lib/python/Products/ZCatalog/ZCatalog.py Sun Dec 7 11:16:37 2003
@@ -10,32 +10,31 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
-"""ZCatalog product"""
+""" ZCatalog product
+
+$Id$
+"""
from Globals import DTMLFile, MessageDialog
import Globals
from OFS.Folder import Folder
-from OFS.FindSupport import FindSupport
from OFS.ObjectManager import ObjectManager
from DateTime import DateTime
-from Acquisition import Implicit, aq_base
+from Acquisition import Implicit
from Persistence import Persistent
from DocumentTemplate.DT_Util import InstanceDict, TemplateDict
from DocumentTemplate.DT_Util import Eval
from AccessControl.Permission import name_trans
from Catalog import Catalog, CatalogError
-from AccessControl import getSecurityManager
from AccessControl.DTML import RestrictedDTML
from AccessControl.Permissions import \
manage_zcatalog_entries, manage_zcatalog_indexes, search_zcatalog
-from zLOG import LOG, ERROR
from ZCatalogIndexes import ZCatalogIndexes
from Products.PluginIndexes.common.PluggableIndex \
import PluggableIndexInterface
-from Products.PluginIndexes.TextIndex.Vocabulary import Vocabulary
from Products.PluginIndexes.TextIndex import Splitter
-import urllib, os, sys, time, types
+import urllib, time, types
import string
from IZCatalog import IZCatalog
@@ -454,8 +453,21 @@
if not obj:
obj = self.resolve_url(p, REQUEST)
if obj is not None:
- self.catalog_object(obj, p, idxs=[name], update_metadata=0)
-
+ # don't update metadata when only reindexing a single
+ # index via the UI
+ try:
+ self.catalog_object(obj, p, idxs=[name],
+ update_metadata=0)
+ except TypeError:
+ # Fall back to Zope 2.6.2 interface. This is necessary for
+ # products like CMF 1.4.2 and earlier that subclass from
+ # ZCatalog and don't support the update_metadata argument.
+ # May be removed some day.
+ from warnings import warn
+ warn('catalog_object interface of %s not up to date'
+ % self.__class__.__name__,
+ DeprecationWarning)
+ self.catalog_object(obj, p, idxs=[name])
def manage_reindexIndex(self, ids=None, REQUEST=None, RESPONSE=None,
URL1=None):
More information about the Zope-Checkins
mailing list