Commit e513c76e authored by Sebastien Robin's avatar Sebastien Robin

added fastRecursiveImmediateReindexObject


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1097 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3cc359cd
......@@ -460,6 +460,28 @@ be a problem)."""
if hasattr(aq_base(c), 'recursiveImmediateReindexObject'):
c.recursiveImmediateReindexObject()
security.declarePublic( 'fastRecursiveImmediateReindexObject' )
def fastRecursiveImmediateReindexObject(self):
"""
Applies immediateReindexObject on self, and on subobjects
This method is mainly used when we paste objects, because
this is too long to wait for recursiveImmediateReindexObject,
and immediateReindexObject does not index sub-object.
So here we reindex sub-object but not sub-sub-objects.
"""
# Reindex self
self.flushActivity(invoke = 0, method_id='immediateReindexObject') # This might create a recursive lock
self.flushActivity(invoke = 0, method_id='recursiveImmediateReindexObject') # This might create a recursive lock
if self.isIndexable:
self.immediateReindexObject()
# Reindex contents
for c in self.objectValues():
if hasattr(aq_base(c), 'immediateReindexObject'):
c.immediateReindexObject()
self.recursiveReindexObject()
security.declareProtected( Permissions.ModifyPortalContent, 'recursiveMoveObject' )
def recursiveMoveObject(self):
"""
......
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