[CMF-checkins] CVS: CMF/CMFDefault - Portal.py:1.33.4.1 PropertiesTool.py:1.9.2.1 RegistrationTool.py:1.16.2.1

Yvo Schubbe schubbe@web.de
Sun, 12 Jan 2003 08:12:44 -0500


Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv3918/CMFDefault

Modified Files:
      Tag: yuppie-buglets1-branch
	Portal.py PropertiesTool.py RegistrationTool.py 
Log Message:
use string methods:
- replaced string functions
- removed useless imports
- updated copyright statement

=== CMF/CMFDefault/Portal.py 1.33 => 1.33.4.1 ===
--- CMF/CMFDefault/Portal.py:1.33	Wed Dec 11 17:20:36 2002
+++ CMF/CMFDefault/Portal.py	Sun Jan 12 08:12:42 2003
@@ -1,21 +1,24 @@
 ##############################################################################
 #
-# 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
-# 
+#
 ##############################################################################
 """ Portal class
 
 $Id$
 """
- 
-import Globals
+
+from Globals import HTMLFile
+from Globals import InitializeClass
+
 from Products.CMFCore.PortalObject import PortalObjectBase
 from Products.CMFCore import PortalFolder
 from Products.CMFCore.TypesTool import ContentFactoryMetadata
@@ -107,8 +110,7 @@
             visited = []
             migrated = []
             self.__migrate_branches(migrations, self, migrated, visited)
-            from string import join
-            return 'Converted:\n%s\n\nDone.' % join(migrated, '\n')
+            return 'Converted:\n%s\n\nDone.' % '\n'.join(migrated)
 
         def __migrate_branches(self, migrations, branch, migrated, visited):
             base = getattr(branch, 'aq_base', branch)
@@ -150,7 +152,7 @@
         def manage_migrate_content( self, REQUEST ):
             pass
 
-Globals.InitializeClass(CMFSite)
+InitializeClass(CMFSite)
 
 
 class PortalGenerator:
@@ -322,7 +324,7 @@
         p.description = description
 
 
-manage_addCMFSiteForm = Globals.HTMLFile('dtml/addPortal', globals())
+manage_addCMFSiteForm = HTMLFile('dtml/addPortal', globals())
 manage_addCMFSiteForm.__name__ = 'addPortal'
 
 def manage_addCMFSite(self, id, title='Portal', description='',
@@ -334,8 +336,7 @@
     Adds a portal instance.
     '''
     gen = PortalGenerator()
-    from string import strip
-    id = strip(id)
+    id = id.strip()
     p = gen.create(self, id, create_userfolder)
     gen.setupDefaultProperties(p, title, description,
                                email_from_address, email_from_name,


=== CMF/CMFDefault/PropertiesTool.py 1.9 => 1.9.2.1 ===
--- CMF/CMFDefault/PropertiesTool.py:1.9	Mon Jan  6 15:41:55 2003
+++ CMF/CMFDefault/PropertiesTool.py	Sun Jan 12 08:12:42 2003
@@ -1,20 +1,20 @@
 ##############################################################################
 #
-# 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
-# 
+#
 ##############################################################################
 """ CMFDefault portal_properties tool.
 
 $Id$
 """
-
 
 from Products.CMFCore.utils import UniqueObject
 from OFS.SimpleItem import SimpleItem


=== CMF/CMFDefault/RegistrationTool.py 1.16 => 1.16.2.1 ===
--- CMF/CMFDefault/RegistrationTool.py:1.16	Mon Jan  6 15:42:06 2003
+++ CMF/CMFDefault/RegistrationTool.py	Sun Jan 12 08:12:42 2003
@@ -1,16 +1,16 @@
 ##############################################################################
 #
-# 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
-# 
+#
 ##############################################################################
-
 """CMFDefault portal_registration tool.
 
 $Id$