From e88b00dab6cb5ea7c13ae3658ec48c497ba35aaa Mon Sep 17 00:00:00 2001 From: Jean-Paul Smets <jp@nexedi.com> Date: Sun, 8 Feb 2004 20:36:26 +0000 Subject: [PATCH] getBaseCategoryList instead of getBaseCategoryIdList git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@451 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/CMFCategory/CategoryTool.py | 14 +++++++------- product/ERP5Type/Base.py | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/product/CMFCategory/CategoryTool.py b/product/CMFCategory/CategoryTool.py index 0e1b3fae44..cd8c12a460 100755 --- a/product/CMFCategory/CategoryTool.py +++ b/product/CMFCategory/CategoryTool.py @@ -141,8 +141,8 @@ class CategoryTool( UniqueObject, Folder, Base ): return apply( ContentFilter, (), self._buildFilter(spec, filter, kw) ) # Category accessors - security.declareProtected(Permissions.AccessContentsInformation, 'getBaseCategoryIdList') - def getBaseCategoryIdList(self, context=None): + security.declareProtected(Permissions.AccessContentsInformation, 'getBaseCategoryList') + def getBaseCategoryList(self, context=None): """ Returns the ids of base categories of the portal_categories tool if no context is provided, otherwise, returns the base categories @@ -160,7 +160,7 @@ class CategoryTool( UniqueObject, Folder, Base ): return context._categories security.declareProtected(Permissions.AccessContentsInformation, 'getBaseCategoryIds') - getBaseCategoryIds = getBaseCategoryIdList + getBaseCategoryIds = getBaseCategoryList security.declareProtected(Permissions.AccessContentsInformation, 'baseCategoryIds') baseCategoryIds = getBaseCategoryIds @@ -320,7 +320,7 @@ class CategoryTool( UniqueObject, Folder, Base ): recursive -- if set to 0 do not apply recursively """ if base_category is None: - base_category_list = self.getBaseCategoryIdList() + base_category_list = self.getBaseCategoryList() elif type(base_category) == type('a'): base_category_list = [base_category] else: @@ -386,7 +386,7 @@ class CategoryTool( UniqueObject, Folder, Base ): if type(base_category) == type('a'): base_category_list = [base_category] elif base_category is None: - base_category_list = self.getBaseCategoryIdList() + base_category_list = self.getBaseCategoryList() else: base_category_list = base_category if display_none_category: @@ -925,7 +925,7 @@ class CategoryTool( UniqueObject, Folder, Base ): security.declareProtected( Permissions.AccessContentsInformation, '_getAcquiredCategoryList' ) def _getAcquiredCategoryList(self, context): result = self.getAcquiredCategoryMembershipList(context, - base_category = self.getBaseCategoryIdList(context=context)) + base_category = self.getBaseCategoryList(context=context)) if getattr(context, 'isCategory', 0): result = tuple(list(result) + [context.getRelativeUrl()]) # Pure category is member of itself return result @@ -988,7 +988,7 @@ class CategoryTool( UniqueObject, Folder, Base ): if type(base_category_list) is type('a'): base_category_list = [base_category_list] elif base_category_list is () or base_category_list is None: - base_category_list = self.getBaseCategoryIdList() + base_category_list = self.getBaseCategoryList() category_list = [] #LOG('getRelatedValueList',0,'base_category_list: %s' % str(base_category_list)) for base_category in base_category_list: diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py index 6428ffd7fc..426081e26e 100755 --- a/product/ERP5Type/Base.py +++ b/product/ERP5Type/Base.py @@ -894,15 +894,15 @@ class Base( CopyContainer, PortalContent, Base18, ActiveObject, ERP5PropertyMana def _setCategoryList(self, path_list): self.categories = tuple(path_list) - security.declareProtected( Permissions.View, 'getBaseCategoryIdList' ) - def getBaseCategoryIdList(self): + security.declareProtected( Permissions.View, 'getBaseCategoryList' ) + def getBaseCategoryList(self): """ Lists the base_category ids which apply to this instance """ - return self._getCategoryTool().getBaseCategoryIdList(context=self) + return self._getCategoryTool().getBaseCategoryList(context=self) security.declareProtected( Permissions.View, 'getBaseCategoryIds' ) - getBaseCategoryIds = getBaseCategoryIdList + getBaseCategoryIds = getBaseCategoryList security.declareProtected( Permissions.View, 'getBaseCategoryValueList' ) def getBaseCategoryValueList(self): -- 2.30.9