[CMF-checkins] CVS: CMF/CMFCore - CachingPolicyManager.py:1.7 CatalogTool.py:1.39 ContentTypeRegistry.py:1.13

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


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

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

=== CMF/CMFCore/CachingPolicyManager.py 1.6 => 1.7 ===
--- CMF/CMFCore/CachingPolicyManager.py:1.6	Wed Apr 10 14:17:56 2002
+++ CMF/CMFCore/CachingPolicyManager.py	Tue Feb  4 17:07:14 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,11 +11,11 @@
 # FOR A PARTICULAR PURPOSE
 #
 ##############################################################################
-
 """Caching tool implementation.
 
 $Id$
 """
+
 from App.Common import rfc1123_date
 
 from AccessControl import ClassSecurityInfo
@@ -38,8 +39,6 @@
 from Products.CMFCore.CMFCorePermissions import ManagePortal
 from Products.CMFCore.Expression import Expression
 
-from Products.CMFCore.utils import _getAuthenticatedUser
-from Products.CMFCore.utils import _checkPermission
 from Products.CMFCore.utils import getToolByName
 from Products.CMFCore.utils import _dtmldir
 import time


=== CMF/CMFCore/CatalogTool.py 1.38 => 1.39 ===
--- CMF/CMFCore/CatalogTool.py:1.38	Mon Jan  6 15:35:28 2003
+++ CMF/CMFCore/CatalogTool.py	Tue Feb  4 17:07:14 2003
@@ -1,35 +1,34 @@
 ##############################################################################
 #
-# 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 catalog.
 
 $Id$
 """
 
-import os
-from utils import UniqueObject, _checkPermission, _getAuthenticatedUser
-from utils import getToolByName, _dtmldir
 from Products.ZCatalog.ZCatalog import ZCatalog
 from Globals import InitializeClass, package_home, DTMLFile
-import urllib
 from DateTime import DateTime
-from string import join
 from AccessControl.PermissionRole import rolesForPermissionOn
 from AccessControl import ClassSecurityInfo
+from utils import _checkPermission
+from utils import _dtmldir
+from utils import _getAuthenticatedUser
 from utils import _mergedLocalRoles
+from utils import UniqueObject
 from ActionProviderBase import ActionProviderBase
 from ActionInformation import ActionInformation
 from Expression import Expression
-import os
 from CMFCorePermissions import ManagePortal
 from CMFCorePermissions import AccessInactivePortalContent
 from Acquisition import aq_base
@@ -221,7 +220,7 @@
     __call__ = searchResults
 
     def __url(self, ob):
-        return join(ob.getPhysicalPath(), '/')
+        return '/'.join( ob.getPhysicalPath() )
 
     manage_catalogFind = DTMLFile( 'catalogFind', _dtmldir )
 


=== CMF/CMFCore/ContentTypeRegistry.py 1.12 => 1.13 ===
--- CMF/CMFCore/ContentTypeRegistry.py:1.12	Mon Jan  6 15:35:28 2003
+++ CMF/CMFCore/ContentTypeRegistry.py	Tue Feb  4 17:07:14 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'[, ]' ) ):