Commit 0fcea34d authored by Jérome Perrin's avatar Jérome Perrin

remove old comments that no longuer apply in searchFolder and countFolder. We

don't remove empty parameters before calling the catalog. The catalog decides
how to handle them.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18236 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a8c2d608
...@@ -277,20 +277,7 @@ class FolderMixIn(ExtensionClass.Base): ...@@ -277,20 +277,7 @@ class FolderMixIn(ExtensionClass.Base):
if delete_parent_uid: if delete_parent_uid:
del kw['parent_uid'] del kw['parent_uid']
# kw2 = {} return self.portal_catalog.searchResults(**kw)
# I (seb) remove this because sometimes it
# is important to give a None parameter, like limit=None
# Remove useless matter before calling the
# catalog. In particular, consider empty
# strings as None values
#for cname in kw.keys():
# if kw[cname] != '' and kw[cname] != None:
# kw2[cname] = kw[cname]
# The method to call to search the folder
# content has to be called z_search_folder
method = self.portal_catalog.portal_catalog
return method(**kw)
security.declareProtected(Permissions.View, 'countFolder') security.declareProtected(Permissions.View, 'countFolder')
def countFolder(self, **kw): def countFolder(self, **kw):
...@@ -323,17 +310,7 @@ class FolderMixIn(ExtensionClass.Base): ...@@ -323,17 +310,7 @@ class FolderMixIn(ExtensionClass.Base):
if delete_parent_uid: if delete_parent_uid:
del kw['parent_uid'] del kw['parent_uid']
#kw2 = {} return self.portal_catalog.countResults(**kw)
# Remove useless matter before calling the
# catalog. In particular, consider empty
# strings as None values
#for cname in kw.keys():
# if kw[cname] != '' and kw[cname]!=None:
# kw2[cname] = kw[cname]
# The method to call to search the folder
# content has to be called z_search_folder
method = self.portal_catalog.countResults
return method(**kw)
# Count objects in the folder # Count objects in the folder
security.declarePrivate('_count') security.declarePrivate('_count')
......
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