Commit dddc54f0 authored by Julien Muchembled's avatar Julien Muchembled

CategoryTool.isAcquiredMemberOf was defined 3 times. Only the last definition matters.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26418 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7d7cea92
......@@ -1147,39 +1147,6 @@ class CategoryTool( UniqueObject, Folder, Base ):
return 1
return 0
security.declareProtected( Permissions.AccessContentsInformation, 'isAcquiredMemberOf' )
def isAcquiredMemberOf(self, context, category, strict=0):
"""
Tests if an object if member of a given category
Category is a string here. It could be more than a string (ex. an object)
"""
if getattr(aq_base(context), 'isCategory', 0):
return context.isAcquiredMemberOf(category)
if strict:
for c in self._getAcquiredCategoryList(context):
if c == category:
return 1
else:
for c in self._getAcquiredCategoryList(context):
if c.find(category) >= 0:
return 1
return 0
security.declareProtected( Permissions.AccessContentsInformation, 'isAcquiredMemberOf' )
def isAcquiredMemberOf(self, context, category):
"""
Tests if an object if member of a given category
Category is a string here. It could be more than a string (ex. an object)
XXX Should include acquisition ?
"""
if getattr(aq_base(context), 'isCategory', 0):
return context.isAcquiredMemberOf(category)
for c in self._getAcquiredCategoryList(context):
if c.find(category) >= 0:
return 1
return 0
security.declareProtected( Permissions.AccessContentsInformation, 'isAcquiredMemberOf' )
def isAcquiredMemberOf(self, context, category):
"""
......
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