Commit d2790877 authored by Sebastien Robin's avatar Sebastien Robin

allow to override a method before calling clear catalog

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17288 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 267c323f
...@@ -587,6 +587,8 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -587,6 +587,8 @@ class ZCatalog(Folder, Persistent, Implicit):
if REQUEST is not None and sql_catalog_id is None: if REQUEST is not None and sql_catalog_id is None:
sql_catalog_id = REQUEST.get('sql_catalog_id', None) sql_catalog_id = REQUEST.get('sql_catalog_id', None)
self.beforeCatalogClear()
catalog = self.getSQLCatalog(sql_catalog_id) catalog = self.getSQLCatalog(sql_catalog_id)
if catalog is not None: if catalog is not None:
catalog.manage_catalogClear(REQUEST=REQUEST, RESPONSE=RESPONSE, URL1=URL1) catalog.manage_catalogClear(REQUEST=REQUEST, RESPONSE=RESPONSE, URL1=URL1)
...@@ -846,6 +848,10 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -846,6 +848,10 @@ class ZCatalog(Folder, Persistent, Implicit):
if catalog is not None: if catalog is not None:
catalog.beforeUncatalogObject(uid=uid,path=path) catalog.beforeUncatalogObject(uid=uid,path=path)
def beforeCatalogClear(self):
""" allow to override this method """
pass
def catalogTranslationList(self, object_list, sql_catalog_id=None): def catalogTranslationList(self, object_list, sql_catalog_id=None):
"""Catalog translations. """Catalog translations.
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment