[CMF-checkins] CVS: CMF/CMFDefault - SyndicationTool.py:1.12
Andrew Sawyers
andrew@zope.com
Fri, 18 Jan 2002 13:36:26 -0500
Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv23938/CMFDefault
Modified Files:
SyndicationTool.py
Log Message:
*Merging bug fixes from the 1.2-branch to the head.
=== CMF/CMFDefault/SyndicationTool.py 1.11 => 1.12 ===
if not self.isSiteSyndicationAllowed():
raise 'Syndication is Not Allowed'
+ if obj is None:
+ return self.syUpdatePeriod
else:
syInfo = getattr(obj, 'syndication_information',
None)
if syInfo is not None:
return syInfo.syUpdatePeriod
else:
- #return self.syUpdatePeriod
return 'Syndication is Not Allowed'
security.declarePublic('getUpdateFrequency')
@@ -274,6 +275,8 @@
"""
if not self.isSiteSyndicationAllowed():
raise 'Syndication is not Allowed'
+ if obj is None:
+ return self.syUpdateFrequency
else:
syInfo = getattr(obj, 'syndication_information',
None)
@@ -298,6 +301,9 @@
#import pdb; pdb.set_trace()
if not self.isSiteSyndicationAllowed():
raise 'Syndication is not Allowed'
+ if obj is None:
+ when = self.syUpdateBase
+ return when.ISO()
else:
syInfo = getattr(obj, 'syndication_information',
None)
@@ -314,6 +320,9 @@
"""
if not self.isSiteSyndicationAllowed():
raise 'Syndication is not Allowed'
+ if obj is None:
+ when = syUpdateBase
+ return when.HTML4()
else:
syInfo = getattr(obj, 'syndication_information',
None)
@@ -329,6 +338,8 @@
"""
if not self.isSiteSyndicationAllowed():
raise 'Syndication is not Allowed'
+ if obj is None:
+ return self.max_items
else:
syInfo = getattr(obj, 'syndication_information',
None)