[CMF-checkins] CVS: CMF/CMFDefault - MembershipTool.py:1.29 MetadataTool.py:1.19 Portal.py:1.34
Yvo Schubbe
schubbe@web.de
Tue, 4 Feb 2003 17:32:54 -0500
Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv3712/CMFDefault
Modified Files:
MembershipTool.py MetadataTool.py Portal.py
Log Message:
Merged yuppie-buglets1-branch:
- Fixed buglets. (Collector #94 and #95)
- Removed string functions and useless imports.
=== CMF/CMFDefault/MembershipTool.py 1.28 => 1.29 ===
--- CMF/CMFDefault/MembershipTool.py:1.28 Mon Jan 6 15:41:44 2003
+++ CMF/CMFDefault/MembershipTool.py Tue Feb 4 17:32:51 2003
@@ -1,6 +1,7 @@
##############################################################################
#
-# 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.
@@ -10,7 +11,6 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
-
""" CMFDefault portal_membership tool.
$Id$
@@ -21,7 +21,6 @@
from Products.CMFCore.MembershipTool import MembershipTool as BaseTool
from Products.CMFCore.PortalFolder import manage_addPortalFolder
-from Products.CMFCore.utils import _getAuthenticatedUser
from Products.CMFCore.utils import _checkPermission
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.ActionsTool import ActionInformation as AI
=== CMF/CMFDefault/MetadataTool.py 1.18 => 1.19 ===
--- CMF/CMFDefault/MetadataTool.py:1.18 Mon Jan 6 15:41:55 2003
+++ CMF/CMFDefault/MetadataTool.py Tue Feb 4 17:32:51 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
-#
+#
##############################################################################
""" CMFDefault portal_metadata tool.
@@ -18,7 +19,6 @@
from OFS.SimpleItem import SimpleItem
from Products.CMFCore.utils import UniqueObject
from Globals import PersistentMapping
-
from Globals import InitializeClass, DTMLFile
from AccessControl import ClassSecurityInfo, getSecurityManager
=== CMF/CMFDefault/Portal.py 1.33 => 1.34 ===
--- CMF/CMFDefault/Portal.py:1.33 Wed Dec 11 17:20:36 2002
+++ CMF/CMFDefault/Portal.py Tue Feb 4 17:32:51 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,