[CMF-checkins] CVS: CMF/CMFCore - DiscussionTool.py:1.10 DynamicType.py:1.15 MemberDataTool.py:1.21

Yvo Schubbe schubbe@web.de
Tue, 4 Feb 2003 17:12:50 -0500


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

Modified Files:
	DiscussionTool.py DynamicType.py MemberDataTool.py 
Log Message:
Merged yuppie-buglets1-branch:
- Fixed buglets. (Collector #94 and #95)
- Removed string functions and useless imports.

=== CMF/CMFCore/DiscussionTool.py 1.9 => 1.10 ===
--- CMF/CMFCore/DiscussionTool.py:1.9	Mon Jan  6 15:35:40 2003
+++ CMF/CMFCore/DiscussionTool.py	Tue Feb  4 17:12:47 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.15 ===
--- CMF/CMFCore/DynamicType.py:1.14	Mon Jan  6 15:35:40 2003
+++ CMF/CMFCore/DynamicType.py	Tue Feb  4 17:12: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
-# 
+#
 ##############################################################################
 """ 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)


=== CMF/CMFCore/MemberDataTool.py 1.20 => 1.21 ===
--- CMF/CMFCore/MemberDataTool.py:1.20	Mon Jan  6 15:35:50 2003
+++ CMF/CMFCore/MemberDataTool.py	Tue Feb  4 17:12: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)