[CMF-checkins] CVS: CMF/CMFDefault - DefaultWorkflow.py:1.19.6.1
DiscussionItem.py:1.33.4.2 DiscussionTool.py:1.14.20.2
Document.py:1.56.4.2 DublinCore.py:1.27.2.1
Favorite.py:1.19.4.2 File.py:1.25.4.2 Image.py:1.23.4.2
Link.py:1.26.4.2 MembershipTool.py:1.33.4.3
MetadataTool.py:1.20.20.1 NewsItem.py:1.18.4.2
Portal.py:1.35.20.1 PropertiesTool.py:1.11.20.2
RegistrationTool.py:1.19.10.3 SkinnedFolder.py:1.13.4.3
SyndicationInfo.py:1.1.78.1 SyndicationTool.py:1.18.20.3
__init__.py:1.21.16.1 utils.py:1.19.16.1 version.txt:1.7.32.6
Sidnei da Silva
sidnei at awkly.org
Thu Apr 22 13:48:32 EDT 2004
Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv30596/CMFDefault
Modified Files:
Tag: CMF-1_4-branch
DefaultWorkflow.py DiscussionItem.py DiscussionTool.py
Document.py DublinCore.py Favorite.py File.py Image.py Link.py
MembershipTool.py MetadataTool.py NewsItem.py Portal.py
PropertiesTool.py RegistrationTool.py SkinnedFolder.py
SyndicationInfo.py SyndicationTool.py __init__.py utils.py
version.txt
Log Message:
Fix version.txt to right version. Run reindent.py for removing extra tabs and whitespaces
=== CMF/CMFDefault/DefaultWorkflow.py 1.19 => 1.19.6.1 ===
--- CMF/CMFDefault/DefaultWorkflow.py:1.19 Fri Mar 14 12:12:06 2003
+++ CMF/CMFDefault/DefaultWorkflow.py Thu Apr 22 13:47:50 2004
@@ -139,7 +139,7 @@
'''
Allows this workflow to include actions to be displayed
in the actions box. Called on every request.
-
+
Returns the actions to be displayed to the user.
'''
if info.isAnonymous:
@@ -320,4 +320,3 @@
InitializeClass(DefaultWorkflowDefinition)
addWorkflowClass(DefaultWorkflowDefinition)
-
=== CMF/CMFDefault/DiscussionItem.py 1.33.4.1 => 1.33.4.2 ===
--- CMF/CMFDefault/DiscussionItem.py:1.33.4.1 Fri May 9 17:31:39 2003
+++ CMF/CMFDefault/DiscussionItem.py Thu Apr 22 13:47:50 2004
@@ -71,9 +71,9 @@
Otherwise, same as addDocument
"""
-
+
if not description: description = title
- text = scrubHTML(text)
+ text = scrubHTML(text)
item = DiscussionItem( id )
item.title = title
item.description = description
@@ -87,7 +87,7 @@
if RESPONSE is not None:
RESPONSE.redirect(self.absolute_url())
-
+
class DiscussionItem( Document
, DefaultDublinCoreImpl
):
@@ -118,7 +118,7 @@
"""
# XXX: revisit if Creator becomes "real" attribute for stock DC.
return self.creator
-
+
#
# DiscussionResponse interface
#
@@ -132,7 +132,7 @@
- We are a "top-level" reply to a non-DiscussionItem piece
of content; in this case, our 'in_reply_to' field will
be None.
-
+
- We are a nested reply; in this case, our 'in_reply_to'
field will be the ID of the parent DiscussionItem.
"""
@@ -149,7 +149,7 @@
self.in_reply_to = reply_to.getId()
else:
self.in_reply_to = None
-
+
security.declareProtected(View, 'parentsInThread')
def parentsInThread( self, size=0 ):
"""
@@ -308,7 +308,7 @@
item.__of__( self ).indexObject()
item.setReplyTo( self._getDiscussable() )
-
+
self._container[ id ] = item
return id
@@ -338,10 +338,10 @@
Test to see if there are any dicussion items
"""
outer = self._getDiscussable( outer=1 )
- if content_obj == outer:
+ if content_obj == outer:
return not not len( self._container )
else:
- return not not len( content_obj.talkback._getReplyResults() )
+ return not not len( content_obj.talkback._getReplyResults() )
security.declareProtected(View, 'replyCount')
def replyCount( self, content_obj ):
@@ -390,9 +390,9 @@
Return this object's contents in a form suitable for inclusion
as a quote in a response.
"""
-
+
return ""
-
+
#
# Utility methods
#
@@ -407,7 +407,7 @@
return outer
parent = self._container[ in_reply_to ].__of__( aq_inner( self ) )
return parent.__of__( outer )
-
+
security.declarePrivate( '_getDiscussable' )
def _getDiscussable( self, outer=0 ):
@@ -439,5 +439,3 @@
return result
InitializeClass( DiscussionItemContainer )
-
-
=== CMF/CMFDefault/DiscussionTool.py 1.14.20.1 => 1.14.20.2 ===
--- CMF/CMFDefault/DiscussionTool.py:1.14.20.1 Thu Mar 11 08:08:27 2004
+++ CMF/CMFDefault/DiscussionTool.py Thu Apr 22 13:47:50 2004
@@ -60,7 +60,7 @@
manage_options = (ActionProviderBase.manage_options +
({ 'label' : 'Overview', 'action' : 'manage_overview' }
- ,
+ ,
) + SimpleItem.manage_options)
#
@@ -96,11 +96,11 @@
"""
if not self.isDiscussionAllowedFor( content ):
raise DiscussionNotAllowed
-
+
talkback = getattr( content, 'talkback', None )
if not talkback:
talkback = self._createDiscussionFor( content )
-
+
return talkback
security.declarePublic( 'isDiscussionAllowedFor' )
=== CMF/CMFDefault/Document.py 1.56.4.1 => 1.56.4.2 ===
--- CMF/CMFDefault/Document.py:1.56.4.1 Fri May 9 17:31:39 2003
+++ CMF/CMFDefault/Document.py Thu Apr 22 13:47:50 2004
@@ -42,7 +42,7 @@
, 'product' : 'CMFDefault'
, 'factory' : 'addDocument'
, 'immediate_view' : 'metadata_edit_form'
- , 'actions' : ( { 'id' : 'view'
+ , 'actions' : ( { 'id' : 'view'
, 'name' : 'View'
, 'action': 'string:${object_url}/document_view'
, 'permissions' : (View,)
@@ -78,7 +78,7 @@
body parts perfectly rendered.
"""
for c in doc.getChildNodes():
- getattr(self, self.element_types[c.getNodeName()])(c, level, output)
+ getattr(self, self.element_types[c.getNodeName()])(c, level, output)
CMFHtmlWithImages = CMFHtmlWithImages()
@@ -199,7 +199,7 @@
""" Simple stab at guessing the inner format of the text """
if html_headcheck(text): return 'html'
else: return 'structured-text'
-
+
security.declarePrivate('handleText')
def handleText(self, text, format=None, stx_level=None):
""" Handles the raw text, returning headers, body, format """
@@ -316,7 +316,7 @@
def Description(self):
""" Dublin core description, also important for indexing """
return self.description
-
+
security.declareProtected(View, 'Format')
def Format(self):
""" Returns a content-type style format of the underlying source """
@@ -324,7 +324,7 @@
return 'text/html'
else:
return 'text/plain'
-
+
security.declareProtected(ModifyPortalContent, 'setFormat')
def setFormat(self, format):
""" Set text format and Dublin Core resource format.
=== CMF/CMFDefault/DublinCore.py 1.27 => 1.27.2.1 ===
--- CMF/CMFDefault/DublinCore.py:1.27 Thu Apr 24 17:18:02 2003
+++ CMF/CMFDefault/DublinCore.py Thu Apr 22 13:47:50 2004
@@ -450,7 +450,7 @@
# locking interface, and fail gracefully if they dont
if hasattr(self, 'failIfLocked'):
self.failIfLocked()
-
+
self._editMetadata(title=title
, subject=subject
, description=description
=== CMF/CMFDefault/Favorite.py 1.19.4.1 => 1.19.4.2 ===
--- CMF/CMFDefault/Favorite.py:1.19.4.1 Fri May 9 17:31:39 2003
+++ CMF/CMFDefault/Favorite.py Thu Apr 22 13:47:50 2004
@@ -116,7 +116,7 @@
security.declareProtected(View, 'getObject')
def getObject(self):
"""
- Return the actual object that the Favorite is
+ Return the actual object that the Favorite is
linking to
"""
portal_url = getToolByName(self, 'portal_url')
=== CMF/CMFDefault/File.py 1.25.4.1 => 1.25.4.2 ===
--- CMF/CMFDefault/File.py:1.25.4.1 Fri May 9 17:31:39 2003
+++ CMF/CMFDefault/File.py Thu Apr 22 13:47:50 2004
@@ -94,7 +94,7 @@
, description, contributors, effective_date, expiration_date
, format, language, rights
)
-
+
# Add the File instance to self
self._setObject(id, fobj)
@@ -120,7 +120,7 @@
# gnashing of teeth and fraying of nerves. Don't do it.
#
# Really.
- #
+ #
# Note that if you use getId() to retrieve an object's ID, you will avoid
# this problem altogether. getId is the new way, accessing .id is
# deprecated.
@@ -128,7 +128,7 @@
__implements__ = ( PortalContent.__implements__
, DefaultDublinCoreImpl.__implements__
)
-
+
meta_type='Portal File'
effective_date = expiration_date = None
_isDiscussable = 1
@@ -217,10 +217,10 @@
security.declareProtected(View, 'download')
def download(self, REQUEST, RESPONSE):
"""Download this item.
-
+
Calls OFS.Image.File.index_html to perform the actual transfer after
first setting Content-Disposition to suggest a filename.
-
+
This method is deprecated, use the URL of this object itself. Because
the default view of a File object is to download, rather than view,
this method is obsolete. Also note that certain browsers do not deal
@@ -240,4 +240,3 @@
InitializeClass(File)
-
=== CMF/CMFDefault/Image.py 1.23.4.1 => 1.23.4.2 ===
--- CMF/CMFDefault/Image.py:1.23.4.1 Fri May 9 17:31:39 2003
+++ CMF/CMFDefault/Image.py Thu Apr 22 13:47:50 2004
@@ -87,7 +87,7 @@
, description, contributors, effective_date, expiration_date
, format, language, rights
)
-
+
# Add the Image instance to self
self._setObject(id, iobj)
@@ -112,7 +112,7 @@
# gnashing of teeth and fraying of nerves. Don't do it.
#
# Really.
- #
+ #
# Note that if you use getId() to retrieve an object's ID, you will avoid
# this problem altogether. getId is the new way, accessing .id is
# deprecated.
@@ -120,7 +120,7 @@
__implements__ = ( PortalContent.__implements__
, DefaultDublinCoreImpl.__implements__
)
-
+
meta_type='Portal Image'
effective_date = expiration_date = None
_isDiscussable = 1
@@ -223,5 +223,3 @@
self.reindexObject()
InitializeClass(Image)
-
-
=== CMF/CMFDefault/Link.py 1.26.4.1 => 1.26.4.2 ===
--- CMF/CMFDefault/Link.py:1.26.4.1 Fri May 9 17:31:39 2003
+++ CMF/CMFDefault/Link.py Thu Apr 22 13:47:50 2004
@@ -177,7 +177,7 @@
for key, value in self.getMetadataHeaders():
if key != 'Format' and not haveheader(key):
headers[key] = value
-
+
self._editMetadata(title=headers['Title'],
subject=headers['Subject'],
description=headers['Description'],
@@ -188,7 +188,7 @@
language=headers['Language'],
rights=headers['Rights'],
)
-
+
## FTP handlers
security.declareProtected(ModifyPortalContent, 'PUT')
def PUT(self, REQUEST, RESPONSE):
@@ -222,9 +222,8 @@
security.declareProtected(View, 'get_size')
def get_size( self ):
"""
- Used for FTP and apparently the ZMI now too
+ Used for FTP and apparently the ZMI now too
"""
return len(self.manage_FTPget())
InitializeClass( Link )
-
=== CMF/CMFDefault/MembershipTool.py 1.33.4.2 => 1.33.4.3 ===
--- CMF/CMFDefault/MembershipTool.py:1.33.4.2 Wed May 28 07:54:02 2003
+++ CMF/CMFDefault/MembershipTool.py Thu Apr 22 13:47:50 2004
@@ -149,7 +149,7 @@
security.declareProtected( ListPortalMembers, 'getRoster' )
def getRoster(self):
""" Return a list of mappings for 'listed' members.
-
+
If Manager, return a list of all usernames. The mapping
contains the id and listed variables.
"""
=== CMF/CMFDefault/MetadataTool.py 1.20 => 1.20.20.1 ===
--- CMF/CMFDefault/MetadataTool.py:1.20 Thu Feb 13 02:46:21 2003
+++ CMF/CMFDefault/MetadataTool.py Thu Apr 22 13:47:50 2004
@@ -82,7 +82,7 @@
Must this element be supplied?
"""
return self.is_required
-
+
security.declareProtected(View , 'supplyDefault')
def supplyDefault( self ):
"""
@@ -135,8 +135,8 @@
self.is_multi_valued = is_multi_valued
self.policies = PersistentMapping()
self.policies[ None ] = self._makePolicy() # set default policy
-
-
+
+
security.declarePrivate( '_makePolicy' )
def _makePolicy( self ):
return MetadataElementPolicy( self.is_multi_valued )
@@ -236,7 +236,7 @@
#
# ZMI methods
#
- manage_options = ( ActionProviderBase.manage_options +
+ manage_options = ( ActionProviderBase.manage_options +
( { 'label' : 'Overview'
, 'action' : 'manage_overview'
}
@@ -401,7 +401,7 @@
"""
# Don't replace.
if self.element_specs.has_key( element ):
- return
+ return
self.element_specs[ element ] = ElementSpec( is_multi_valued )
=== CMF/CMFDefault/NewsItem.py 1.18.4.1 => 1.18.4.2 ===
--- CMF/CMFDefault/NewsItem.py:1.18.4.1 Fri May 9 17:31:39 2003
+++ CMF/CMFDefault/NewsItem.py Thu Apr 22 13:47:50 2004
@@ -98,4 +98,3 @@
InitializeClass( NewsItem )
-
=== CMF/CMFDefault/Portal.py 1.35 => 1.35.20.1 ===
--- CMF/CMFDefault/Portal.py:1.35 Thu Feb 13 03:35:28 2003
+++ CMF/CMFDefault/Portal.py Thu Apr 22 13:47:50 2004
@@ -244,7 +244,7 @@
for t in initial_types:
cfm = apply(ContentFactoryMetadata, (), t)
tool._setObject(t['id'], cfm)
-
+
def setupMimetypes(self, p):
p.manage_addProduct[ 'CMFCore' ].manage_addRegistry()
reg = p.content_type_registry
=== CMF/CMFDefault/PropertiesTool.py 1.11.20.1 => 1.11.20.2 ===
--- CMF/CMFDefault/PropertiesTool.py:1.11.20.1 Thu Mar 11 08:08:27 2004
+++ CMF/CMFDefault/PropertiesTool.py Thu Apr 22 13:47:50 2004
@@ -54,7 +54,7 @@
manage_options = ( ActionProviderBase.manage_options +
({ 'label' : 'Overview', 'action' : 'manage_overview' }
- ,
+ ,
) + SimpleItem.manage_options
)
=== CMF/CMFDefault/RegistrationTool.py 1.19.10.2 => 1.19.10.3 ===
--- CMF/CMFDefault/RegistrationTool.py:1.19.10.2 Thu Mar 11 08:08:27 2004
+++ CMF/CMFDefault/RegistrationTool.py Thu Apr 22 13:47:50 2004
@@ -60,7 +60,7 @@
+ ( { 'label' : 'Overview'
, 'action' : 'manage_overview'
}
- ,
+ ,
)
)
manage_overview = DTMLFile( 'explainRegistrationTool', _dtmldir )
@@ -72,7 +72,7 @@
def testPasswordValidity(self, password, confirm=None):
""" Verify that the password satisfies the portal's requirements.
-
+
o If the password is valid, return None.
o If not, return a string explaining why.
"""
@@ -80,7 +80,7 @@
return 'Your password must contain at least 5 characters.'
if confirm is not None and confirm != password:
- return ( 'Your password and confirmation did not match. '
+ return ( 'Your password and confirmation did not match. '
+ 'Please try again.' )
return None
@@ -118,7 +118,7 @@
def mailPassword(self, forgotten_userid, REQUEST):
""" Email a forgotten password to a member.
-
+
o Raise an exception if user ID is not found.
"""
membership = getToolByName(self, 'portal_membership')
@@ -126,12 +126,12 @@
if member is None:
raise 'NotFound', 'The username you entered could not be found.'
-
+
# assert that we can actually get an email address, otherwise
# the template will be made with a blank To:, this is bad
if not member.getProperty('email'):
raise 'ValueError', 'That user does not have an email address.'
-
+
# Rather than have the template try to use the mailhost, we will
# render the message ourselves and send it from here (where we
# don't need to worry about 'UseMailHost' permissions).
@@ -140,7 +140,7 @@
, member=member
, password=member.getPassword()
)
-
+
host = self.MailHost
host.send( mail_text )
@@ -163,7 +163,7 @@
if email is None:
raise ValueError( 'Member %s has no e-mail address!'
% new_member_id )
-
+
# Rather than have the template try to use the mailhost, we will
# render the message ourselves and send it from here (where we
# don't need to worry about 'UseMailHost' permissions).
@@ -173,7 +173,7 @@
, password=password
, email=email
)
-
+
host = self.MailHost
host.send( mail_text )
@@ -192,7 +192,7 @@
o Checks should be done before this method is called using
testPropertiesValidity and testPasswordValidity
"""
-
+
mtool = getToolByName(self, 'portal_membership')
member = mtool.getMemberById(member_id)
member.setMemberProperties(properties)
=== CMF/CMFDefault/SkinnedFolder.py 1.13.4.2 => 1.13.4.3 ===
--- CMF/CMFDefault/SkinnedFolder.py:1.13.4.2 Sat Jan 31 05:43:57 2004
+++ CMF/CMFDefault/SkinnedFolder.py Thu Apr 22 13:47:50 2004
@@ -36,7 +36,7 @@
, 'factory' : 'addSkinnedFolder'
, 'filter_content_types' : 0
, 'immediate_view' : 'folder_edit_form'
- , 'actions' : ( { 'id' : 'view'
+ , 'actions' : ( { 'id' : 'view'
, 'name' : 'View'
, 'action': 'string:${object_url}/folder_view'
, 'permissions' : (View,)
=== CMF/CMFDefault/SyndicationInfo.py 1.1 => 1.1.78.1 ===
--- CMF/CMFDefault/SyndicationInfo.py:1.1 Fri May 18 17:29:46 2001
+++ CMF/CMFDefault/SyndicationInfo.py Thu Apr 22 13:47:50 2004
@@ -1,5 +1,5 @@
from OFS.SimpleItem import SimpleItem
class SyndicationInformation(SimpleItem):
- id='syndication_information'
- meta_type='SyndicationInformation'
+ id='syndication_information'
+ meta_type='SyndicationInformation'
=== CMF/CMFDefault/SyndicationTool.py 1.18.20.2 => 1.18.20.3 ===
--- CMF/CMFDefault/SyndicationTool.py:1.18.20.2 Thu Mar 11 08:08:27 2004
+++ CMF/CMFDefault/SyndicationTool.py Thu Apr 22 13:47:50 2004
@@ -355,8 +355,8 @@
syInfo = getattr(obj, 'syndication_information',
None)
if syInfo is not None:
- when = syInfo.syUpdateBase
- return when.ISO()
+ when = syInfo.syUpdateBase
+ return when.ISO()
else:
return 'Syndication is not Allowed'
=== CMF/CMFDefault/__init__.py 1.21 => 1.21.16.1 ===
--- CMF/CMFDefault/__init__.py:1.21 Mon Feb 24 08:58:46 2003
+++ CMF/CMFDefault/__init__.py Thu Apr 22 13:47:50 2004
@@ -27,7 +27,7 @@
from Products.CMFCore.utils import registerIcon
import utils
-
+
import Portal
import Document
import Link
=== CMF/CMFDefault/utils.py 1.19 => 1.19.16.1 ===
--- CMF/CMFDefault/utils.py:1.19 Sun Feb 23 07:24:26 2003
+++ CMF/CMFDefault/utils.py Thu Apr 22 13:47:50 2004
@@ -218,7 +218,7 @@
if name:
self.metatags[ name ] = content
-
+
def unknown_startag( self, tag, attrs ):
self.setliteral()
=== CMF/CMFDefault/version.txt 1.7.32.5 => 1.7.32.6 ===
--- CMF/CMFDefault/version.txt:1.7.32.5 Thu Feb 5 01:06:35 2004
+++ CMF/CMFDefault/version.txt Thu Apr 22 13:47:50 2004
@@ -1 +1,2 @@
-CMF-1.4.3-rc1
+CMF-1.4.3
+
More information about the CMF-checkins
mailing list