Commit b7e0bd67 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Use getPreferredSectionCategory in getPortalDefaultSectionCategory....

Use getPreferredSectionCategory in getPortalDefaultSectionCategory. getPortalDefaultSectionCategory is now deprecated.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4379 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ca60a4d0
......@@ -259,9 +259,16 @@ class ERP5Site ( CMFSite, FolderMixIn ):
security.declareProtected(Permissions.AccessContentsInformation, 'getPortalDefaultSectionCategory')
def getPortalDefaultSectionCategory(self):
"""
Return a default section category.
"""
return self._getPortalConfiguration('portal_default_section_category')
Return a default section category. This method is deprecated.
"""
LOG('ERP5Site', 0, 'getPortalDefaultSectionCategory is deprecated; use portal_preferences.getPreferredSectionCategory instead.')
section_category = self.portal_preferences.getPreferredSectionCategory()
# XXX This is only for backward-compatibility.
if not section_category:
section_category = self._getPortalConfiguration('portal_default_section_category')
return section_category
security.declareProtected(Permissions.AccessContentsInformation, 'getPortalResourceTypeList')
def getPortalResourceTypeList(self):
......
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