[CMF-checkins] CVS: Products/CMFCore - PortalFolder.py:1.80

Yvo Schubbe y.2005- at wcm-solutions.de
Tue Apr 26 10:46:18 EDT 2005


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

Modified Files:
	PortalFolder.py 
Log Message:
- all portal types have to implement DynamicType, so getTypeInfo always exists
- meta_type might mask a problem, 'Unknown' is a more explicit fallback


=== Products/CMFCore/PortalFolder.py 1.79 => 1.80 ===
--- Products/CMFCore/PortalFolder.py:1.79	Wed Mar 23 16:56:09 2005
+++ Products/CMFCore/PortalFolder.py	Tue Apr 26 10:45:48 2005
@@ -283,11 +283,8 @@
     def Type( self ):
         """ Dublin Core Type element - resource type.
         """
-        if hasattr(aq_base(self), 'getTypeInfo'):
-            ti = self.getTypeInfo()
-            if ti is not None:
-                return ti.Title()
-        return self.meta_type
+        ti = self.getTypeInfo()
+        return ti is not None and ti.Title() or 'Unknown'
 
     #
     #   other methods



More information about the CMF-checkins mailing list