Commit 9498b936 authored by Jérome Perrin's avatar Jérome Perrin

drop support for immediate_reindex=True in newContent. Immediate reindexing is

a coding crime, we should not have an API for that.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34788 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3adbb375
......@@ -1226,7 +1226,7 @@ class ERP5Site(FolderMixIn, CMFSite):
return None
security.declareProtected(Permissions.AddPortalContent, 'newContent')
def newContent(self, id=None, portal_type=None, immediate_reindex=0, **kw):
def newContent(self, id=None, portal_type=None, **kw):
"""
Creates a new content
"""
......@@ -1240,10 +1240,8 @@ class ERP5Site(FolderMixIn, CMFSite):
) # **kw) removed due to CMF bug
new_instance = self[id]
if kw is not None:
if kw:
new_instance._edit(force_update=1, **kw)
if immediate_reindex:
new_instance.immediateReindexObject()
return new_instance
security.declarePublic('getVisibleAllowedContentTypeList')
......
......@@ -112,9 +112,9 @@ class FolderMixIn(ExtensionClass.Base):
security.declarePublic('newContent')
def newContent(self, id=None, portal_type=None, id_group=None,
default=None, method=None, immediate_reindex=0,
container=None, created_by_builder=0, activate_kw=None,
is_indexable=None, temp_object=0, reindex_kw=None, **kw):
default=None, method=None, container=None, created_by_builder=0,
activate_kw=None, is_indexable=None, temp_object=0, reindex_kw=None,
**kw):
"""Creates a new content.
This method is public, since TypeInformation.constructInstance will perform
the security check.
......@@ -167,8 +167,8 @@ class FolderMixIn(ExtensionClass.Base):
# ERP5TypeInformation, because factory method often do not support
# keywords arguments.
if kw != {} : new_instance._edit(force_update=1, **kw)
if immediate_reindex: new_instance.immediateReindexObject()
if kw:
new_instance._edit(force_update=1, **kw)
return new_instance
security.declareProtected(
......
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