[CMF-checkins] CVS: Products/CMFCore - TypesTool.py:1.74.2.6

Yvo Schubbe y.2004_ at wcm-solutions.de
Sun Nov 7 12:04:45 EST 2004


Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv8487/CMFCore

Modified Files:
      Tag: CMF-1_5-branch
	TypesTool.py 
Log Message:
- replaced 'all_meta_types' by the filtered 'all'
- simplified code


=== Products/CMFCore/TypesTool.py 1.74.2.5 => 1.74.2.6 ===
--- Products/CMFCore/TypesTool.py:1.74.2.5	Thu Oct  7 07:18:34 2004
+++ Products/CMFCore/TypesTool.py	Sun Nov  7 12:04:45 2004
@@ -687,6 +687,9 @@
     security.declareProtected(ManagePortal, 'manage_aliases')
     manage_aliases = PageTemplateFile( 'typesAliases.zpt', _wwwdir )
 
+    #
+    #   ObjectManager methods
+    #
     def all_meta_types(self):
         """Adds TypesTool-specific meta types."""
         all = TypesTool.inheritedAttribute('all_meta_types')(self)
@@ -701,12 +704,11 @@
             allowed[name] = 1
 
         all = TypesTool.inheritedAttribute('filtered_meta_types')(self)
-        meta_types = []
-        for meta_type in self.all_meta_types():
-            if allowed.get(meta_type['name']):
-                meta_types.append(meta_type)
-        return meta_types
+        return tuple( [ mt for mt in all if mt['name'] in allowed ] )
 
+    #
+    #   other methods
+    #
     security.declareProtected(ManagePortal, 'listDefaultTypeInformation')
     def listDefaultTypeInformation(self):
         # Scans for factory_type_information attributes



More information about the CMF-checkins mailing list