[Erp5-report] r17289 - /erp5/trunk/products/ERP5Catalog/CatalogTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Oct 30 11:30:01 CET 2007
Author: seb
Date: Tue Oct 30 11:30:00 2007
New Revision: 17289
URL: http://svn.erp5.org?rev=17289&view=rev
Log:
- store the last activity uid and activity_queue uid when clearing
the catalog
- the current way of unindexing objects does not work if the uid
is not provided, so make sure the uid is given
Modified:
erp5/trunk/products/ERP5Catalog/CatalogTool.py
Modified: erp5/trunk/products/ERP5Catalog/CatalogTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Catalog/CatalogTool.py?rev=17289&r1=17288&r2=17289&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Catalog/CatalogTool.py (original)
+++ erp5/trunk/products/ERP5Catalog/CatalogTool.py Tue Oct 30 11:30:00 2007
@@ -598,6 +598,17 @@
__call__ = searchResults
+ security.declarePrivate('clear')
+ def beforeCatalogClear(self):
+ """
+ Clears the catalog by calling a list of methods
+ """
+ id_tool = self.getPortalObject().portal_ids
+ # Call generate new id in order to store the last id into
+ # the zodb
+ id_tool.generateNewLengthId(id_group='portal_activity')
+ id_tool.generateNewLengthId(id_group='portal_activity_queue')
+
security.declarePrivate('unrestrictedSearchResults')
def unrestrictedSearchResults(self, REQUEST=None, **kw):
"""Calls ZSQLCatalog.searchResults directly without restrictions.
@@ -746,6 +757,9 @@
if object is None:
raise TypeError, 'One of uid, path and object parameters must not be None'
path = self.__url(object)
+ if uid is None:
+ raise TypeError, "unindexObject supports only uid now"
+ self.uncatalog_object(path=path,uid=uid, sql_catalog_id=sql_catalog_id)
self.uncatalog_object(path=path, uid=uid, sql_catalog_id=sql_catalog_id)
security.declarePrivate('beforeUnindexObject')
More information about the Erp5-report
mailing list