[CMF-checkins] CVS: CMF/CMFCore - MemberDataTool.py:1.20.2.1 MembershipTool.py:1.30.2.1 PortalContent.py:1.40.2.1 PortalObject.py:1.7.14.1

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


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv3696/CMFCore

Modified Files:
      Tag: yuppie-buglets1-branch
	MemberDataTool.py MembershipTool.py PortalContent.py 
	PortalObject.py 
Log Message:
use string methods:
- replaced string functions
- removed useless imports
- updated copyright statement

=== CMF/CMFCore/MemberDataTool.py 1.20 => 1.20.2.1 ===
--- CMF/CMFCore/MemberDataTool.py:1.20	Mon Jan  6 15:35:50 2003
+++ CMF/CMFCore/MemberDataTool.py	Sun Jan 12 08:11:47 2003
@@ -1,27 +1,26 @@
 ##############################################################################
 #
-# 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 member data tool.
 
 $Id$
 """
 
-import string
 from utils import UniqueObject, getToolByName, _dtmldir
 from OFS.SimpleItem import SimpleItem
 from OFS.PropertyManager import PropertyManager
-from Globals import Acquisition, Persistent, DTMLFile
-import Globals
+from Globals import DTMLFile
+from Globals import InitializeClass
 from AccessControl.Role import RoleManager
 from BTrees.OOBTree import OOBTree
 from ZPublisher.Converters import type_converters
@@ -116,7 +115,7 @@
 
         for user_wrapper in self._members.values():
             searched = getattr( user_wrapper, search_param, None )
-            if searched is not None and string.find( searched, search_term ) != -1:
+            if searched is not None and searched.find(search_term) != -1:
                 res.append( { 'username' : getattr( user_wrapper, 'id' )
                             , 'email' : getattr( user_wrapper, 'email', '' )
                             }
@@ -178,7 +177,7 @@
         '''
         self._members[id] = m
 
-Globals.InitializeClass(MemberDataTool)
+InitializeClass(MemberDataTool)
 
 
 class MemberData (SimpleItem):
@@ -352,4 +351,4 @@
     # There are other parts of the interface but they are
     # deprecated for use with CMF applications.
 
-Globals.InitializeClass(MemberData)
+InitializeClass(MemberData)


=== CMF/CMFCore/MembershipTool.py 1.30 => 1.30.2.1 ===
--- CMF/CMFCore/MembershipTool.py:1.30	Mon Jan  6 15:35:50 2003
+++ CMF/CMFCore/MembershipTool.py	Sun Jan 12 08:11:47 2003
@@ -1,22 +1,21 @@
 ##############################################################################
 #
-# 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 membership tool.
 
 $Id$
 """
 
-from string import find
 from utils import UniqueObject, _getAuthenticatedUser, _checkPermission
 from utils import getToolByName, _dtmldir
 from OFS.SimpleItem import SimpleItem


=== CMF/CMFCore/PortalContent.py 1.40 => 1.40.2.1 ===
--- CMF/CMFCore/PortalContent.py:1.40	Mon Jan  6 15:36:04 2003
+++ CMF/CMFCore/PortalContent.py	Sun Jan 12 08:11:47 2003
@@ -1,22 +1,21 @@
 ##############################################################################
 #
-# 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
-# 
+#
 ##############################################################################
 """ PortalContent: Base class for all CMF content.
 
 $Id$
 """
 
-import string, urllib
-
 from DateTime import DateTime
 from Globals import InitializeClass
 from Acquisition import aq_base
@@ -27,7 +26,7 @@
 
 from interfaces.Contentish import Contentish
 from DynamicType import DynamicType
-from utils import _checkPermission, _getViewFor
+from utils import _getViewFor
 
 from CMFCatalogAware import CMFCatalogAware
 


=== CMF/CMFCore/PortalObject.py 1.7 => 1.7.14.1 ===
--- CMF/CMFCore/PortalObject.py:1.7	Sun Aug  4 19:32:36 2002
+++ CMF/CMFCore/PortalObject.py	Sun Jan 12 08:11:47 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
-# 
+#
 ##############################################################################
 """ PortalObject: The portal root object class
 
@@ -16,10 +17,16 @@
 """
 
 from Globals import InitializeClass
+
 from PortalFolder import PortalFolder
 from Skinnable import SkinnableObjectManager
-from CMFCorePermissions import *
-from utils import getToolByName
+from CMFCorePermissions import AddPortalMember
+from CMFCorePermissions import SetOwnPassword
+from CMFCorePermissions import SetOwnProperties
+from CMFCorePermissions import MailForgottenPassword
+from CMFCorePermissions import RequestReview
+from CMFCorePermissions import ReviewPortalContent
+from CMFCorePermissions import AccessFuturePortalContent
 
 PORTAL_SKINS_TOOL_ID = 'portal_skins'