[CMF-checkins] CVS: CMF/CMFDefault - DiscussionTool.py:1.5 Document.py:1.36
Andrew Sawyers
andrew@zope.com
Tue, 4 Dec 2001 14:04:50 -0500
Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv31970/CMFDefault
Modified Files:
DiscussionTool.py Document.py
Log Message:
*Tracker #169
*GUI knobs added to metadata edit form skins
*method added to DiscussionTool to override discussability for a
piece of content.
*removed simple_metadata.pt, old kruft.
*added python script isDiscussable to return the objects
allow_discussion or None
=== CMF/CMFDefault/DiscussionTool.py 1.4 => 1.5 ===
#
+ security.declareProtected(CMFCorePermissions.ModifyPortalContent
+ , 'overrideDiscussionFor')
+ def overrideDiscussionFor(self, content, allowDiscussion):
+ """
+ Override discussability for a per object basis or clear and let the site default
+ override.
+ """
+ if allowDiscussion is None or allowDiscussion == 'None':
+ if hasattr(content, 'allow_discussion'):
+ del content.allow_discussion
+ else:
+ allowDiscussion = int(allowDiscussion)
+ if hasattr(content, 'allow_discussion'):
+ content.allow_discussion = allowDiscussion
+ else:
+ content.manage_addProperty('allow_discussion', allowDiscussion, 'boolean')
+
security.declarePublic( 'getDiscussionFor' )
def getDiscussionFor(self, content):
"""
=== CMF/CMFDefault/Document.py 1.35 => 1.36 ===
"""
self.failIfLocked()
-
if text_format == 'structured-text' and FIRST_LINE_COLON.match( text ):
# WAAAA! Inject line to disable header munging.
text = '\n%s' % text