[CMF-checkins] CVS: CMF/CMFCore - ContentTypeRegistry.py:1.12.2.1 DiscussionTool.py:1.9.2.1 DynamicType.py:1.14.2.1
Yvo Schubbe
schubbe@web.de
Sun, 12 Jan 2003 08:11:38 -0500
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv3670/CMFCore
Modified Files:
Tag: yuppie-buglets1-branch
ContentTypeRegistry.py DiscussionTool.py DynamicType.py
Log Message:
use string methods:
- replaced string functions
- removed useless imports
- updated copyright statement
=== CMF/CMFCore/ContentTypeRegistry.py 1.12 => 1.12.2.1 ===
--- CMF/CMFCore/ContentTypeRegistry.py:1.12 Mon Jan 6 15:35:28 2003
+++ CMF/CMFCore/ContentTypeRegistry.py Sun Jan 12 08:11:35 2003
@@ -1,14 +1,15 @@
##############################################################################
#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+# Copyright (c) 2001-2003 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
-#
+#
##############################################################################
""" Basic Site content type registry
@@ -23,7 +24,7 @@
from CMFCorePermissions import ManagePortal
from utils import _dtmldir, getToolByName
-import re, os, string, urllib
+import re, os, urllib
from interfaces.ContentTypeRegistry \
import ContentTypeRegistryPredicate as IContentTypeRegistryPredicate
@@ -48,20 +49,20 @@
self.id = id
security.declareProtected( ManagePortal, 'getMajorType' )
- def getMajorType( self, join=string.join ):
- """
+ def getMajorType(self):
+ """ Get major content types.
"""
if self.major is None:
return 'None'
- return join( self.major )
+ return ' '.join(self.major)
security.declareProtected( ManagePortal, 'getMinorType' )
- def getMinorType( self, join=string.join ):
- """
+ def getMinorType(self):
+ """ Get minor content types.
"""
if self.minor is None:
return 'None'
- return join( self.minor )
+ return ' '.join(self.minor)
security.declareProtected( ManagePortal, 'edit' )
def edit( self, major, minor, COMMA_SPLIT=re.compile( r'[, ]' ) ):
@@ -134,12 +135,12 @@
self.id = id
security.declareProtected( ManagePortal, 'getExtensions' )
- def getExtensions( self, join=string.join ):
- """
+ def getExtensions(self):
+ """ Get filename extensions.
"""
if self.extensions is None:
return 'None'
- return join( self.extensions )
+ return ' '.join(self.extensions)
security.declareProtected( ManagePortal, 'edit' )
def edit( self, extensions, COMMA_SPLIT=re.compile( r'[, ]' ) ):
=== CMF/CMFCore/DiscussionTool.py 1.9 => 1.9.2.1 ===
--- CMF/CMFCore/DiscussionTool.py:1.9 Mon Jan 6 15:35:40 2003
+++ CMF/CMFCore/DiscussionTool.py Sun Jan 12 08:11:35 2003
@@ -1,29 +1,31 @@
##############################################################################
#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+# Copyright (c) 2001-2003 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
-#
+#
##############################################################################
""" Basic portal discussion access tool.
$Id$
"""
-from utils import UniqueObject, getToolByName
-from utils import getToolByName, _dtmldir
+from utils import _dtmldir
+from utils import getToolByName
+from utils import UniqueObject
from CMFCorePermissions import ReplyToItem
from CMFCorePermissions import View
from CMFCorePermissions import AccessContentsInformation
from CMFCorePermissions import ManagePortal
from OFS.SimpleItem import SimpleItem
from Globals import InitializeClass, DTMLFile
-import Acquisition
+from Acquisition import Implicit
from AccessControl import ClassSecurityInfo
from interfaces.Discussions import OldDiscussable as IOldDiscussable
@@ -31,7 +33,7 @@
import oldstyle_portal_discussion as IOldstyleDiscussionTool
-class OldDiscussable(Acquisition.Implicit):
+class OldDiscussable(Implicit):
"""
Adapter for PortalContent to implement "old-style" discussions.
"""
=== CMF/CMFCore/DynamicType.py 1.14 => 1.14.2.1 ===
--- CMF/CMFCore/DynamicType.py:1.14 Mon Jan 6 15:35:40 2003
+++ CMF/CMFCore/DynamicType.py Sun Jan 12 08:11:35 2003
@@ -1,14 +1,15 @@
##############################################################################
#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+# Copyright (c) 2001-2003 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
-#
+#
##############################################################################
""" DynamicType: Mixin for dynamic properties.
@@ -16,8 +17,8 @@
"""
from AccessControl import ClassSecurityInfo
+from Globals import InitializeClass
from utils import getToolByName
-import Globals
from urllib import quote
from interfaces.Dynamic import DynamicType as IDynamicType
@@ -93,4 +94,4 @@
security.declarePublic('icon')
icon = getIcon # For the ZMI
-Globals.InitializeClass (DynamicType)
+InitializeClass(DynamicType)