[CMF-checkins] CVS: CMF/CMFDefault - SyndicationTool.py:1.11
Andrew Sawyers
andrew@zope.com
Mon, 7 Jan 2002 11:26:27 -0500
Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv11414/CMFDefault
Modified Files:
SyndicationTool.py
Log Message:
*Tracker #421 fix
*added aq_base(obj) to in enableSyndication and
isSyndicationAllowed methods to make sure it's not acquired from
a parent object.
=== CMF/CMFDefault/SyndicationTool.py 1.10 => 1.11 ===
from Globals import HTMLFile, package_home, InitializeClass
import string
-from Acquisition import aq_inner, aq_parent
+from Acquisition import aq_base, aq_inner, aq_parent
from DateTime import DateTime
from AccessControl import ClassSecurityInfo, SecurityManagement
from Products.CMFCore.CMFCorePermissions import ManagePortal
@@ -177,7 +177,7 @@
if not self.isSiteSyndicationAllowed():
raise 'Syndication is Disabled'
else:
- if hasattr(obj, 'syndication_information'):
+ if hasattr(aq_base(obj), 'syndication_information'):
raise 'Syndication Information Exists'
syInfo = SyndicationInformation()
obj._setObject('syndication_information', syInfo)
@@ -235,8 +235,7 @@
particular obj is enabled, allowing for turning on only
specific folders for syndication.
"""
- #import pdb; pdb.set_trace()
- syInfo = getattr(obj, 'syndication_information',
+ syInfo = getattr(aq_base(obj), 'syndication_information',
None)
if syInfo is None:
return 0