Commit abf81ec6 authored by Aurel's avatar Aurel

change variable isIndexable to is_indexable


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4770 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0d197658
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Aurlien Calonne <aurel@nexedi.com> # Aurelien Calonne <aurel@nexedi.com>
# #
# WARNING: This program as such is intended to be used by professional # WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential # programmers who take the whole responsability of assessing all potential
...@@ -64,7 +64,7 @@ class TrashTool(BaseTool): ...@@ -64,7 +64,7 @@ class TrashTool(BaseTool):
if 'portal' in path: if 'portal' in path:
path += '_items' path += '_items'
if path not in backup_object_container.objectIds(): if path not in backup_object_container.objectIds():
backup_object_container = backup_object_container.newContent(portal_type='Trash Folder', id=path, isIndexable=0) backup_object_container = backup_object_container.newContent(portal_type='Trash Folder', id=path, is_indexable=0)
backup_object_container.edit(isHidden=1) backup_object_container.edit(isHidden=1)
else: else:
backup_object_container = backup_object_container._getOb(path) backup_object_container = backup_object_container._getOb(path)
......
...@@ -64,7 +64,7 @@ class FolderMixIn(ExtensionClass.Base): ...@@ -64,7 +64,7 @@ class FolderMixIn(ExtensionClass.Base):
security.declareProtected(Permissions.AddPortalContent, 'newContent') security.declareProtected(Permissions.AddPortalContent, 'newContent')
def newContent(self, id=None, portal_type=None, id_group=None, def newContent(self, id=None, portal_type=None, id_group=None,
default=None, method=None, immediate_reindex=0, default=None, method=None, immediate_reindex=0,
container=None, bypass_init_script=0, activate_kw=None, isIndexable=None, **kw): container=None, bypass_init_script=0, activate_kw=None, is_indexable=None, **kw):
""" """
Creates a new content Creates a new content
""" """
...@@ -83,7 +83,7 @@ class FolderMixIn(ExtensionClass.Base): ...@@ -83,7 +83,7 @@ class FolderMixIn(ExtensionClass.Base):
id=new_id, id=new_id,
bypass_init_script=bypass_init_script, bypass_init_script=bypass_init_script,
activate_kw=activate_kw, activate_kw=activate_kw,
isIndexable=isIndexable is_indexable=is_indexable
) # **kw) removed due to CMF bug ) # **kw) removed due to CMF bug
new_instance = container[new_id] new_instance = container[new_id]
if kw != {} : new_instance._edit(force_update=1, **kw) if kw != {} : new_instance._edit(force_update=1, **kw)
......
...@@ -309,12 +309,12 @@ class DocumentConstructor(Method): ...@@ -309,12 +309,12 @@ class DocumentConstructor(Method):
def __init__(self, klass): def __init__(self, klass):
self.klass = klass self.klass = klass
def __call__(self, folder, id, REQUEST=None, activate_kw=None, isIndexable=None, **kw): def __call__(self, folder, id, REQUEST=None, activate_kw=None, is_indexable=None, **kw):
o = self.klass(id) o = self.klass(id)
if activate_kw is not None: if activate_kw is not None:
o._v_activate_kw = activate_kw o._v_activate_kw = activate_kw
if isIndexable is not None: if is_indexable is not None:
o.isIndexable=isIndexable o.isIndexable=is_indexable
folder._setObject(id, o) folder._setObject(id, o)
o.uid = folder.portal_catalog.newUid() o.uid = folder.portal_catalog.newUid()
#LOG('DocumentConstructor', 0, 'o = %r, kw = %r' % (o, kw)) #LOG('DocumentConstructor', 0, 'o = %r, kw = %r' % (o, kw))
......
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