server/checkintegrity.py
changeset 3417 fb17a54b358c
parent 3374 d5bd1b659ce8
child 3720 5376aaadd16b
--- a/server/checkintegrity.py	Wed Sep 23 12:23:00 2009 +0200
+++ b/server/checkintegrity.py	Wed Sep 23 12:23:14 2009 +0200
@@ -68,8 +68,6 @@
     """reindex all entities in the repository"""
     # deactivate modification_date hook since we don't want them
     # to be updated due to the reindexation
-    from cubicweb.server.hooks import (setmtime_before_update_entity,
-                                       uniquecstrcheck_before_modification)
     from cubicweb.server.repository import FTIndexEntityOp
     repo = session.repo
     cursor = session.pool['system']
@@ -80,10 +78,8 @@
         # XXX indexer.init_fti(cursor) once index 0.7 is out
         indexer.init_extensions(cursor)
         cursor.execute(indexer.sql_init_fti())
-    repo.hm.unregister_hook(setmtime_before_update_entity,
-                            'before_update_entity', '')
-    repo.hm.unregister_hook(uniquecstrcheck_before_modification,
-                            'before_update_entity', '')
+    repo.config.disabled_hooks_categories.add('metadata')
+    repo.config.disabled_hooks_categories.add('integrity')
     repo.do_fti = True  # ensure full-text indexation is activated
     etypes = set()
     for eschema in schema.entities():