[CMF-checkins] CVS: CMF/CMFCore - ContentTypeRegistry.py:1.8
Florent Guillaume
fg@nuxeo.com
Sat, 29 Jun 2002 14:18:10 -0400
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv6543/CMFCore
Modified Files:
ContentTypeRegistry.py
Log Message:
Made content_type_registry deal correctly with TypeInfos that have a
title (Tracker #465).
=== CMF/CMFCore/ContentTypeRegistry.py 1.7 => 1.8 ===
from CMFCorePermissions import ManagePortal
-from utils import _dtmldir
+from utils import _dtmldir, getToolByName
import re, os, string, urllib
@@ -406,9 +406,12 @@
typeName = self.findTypeName( name, content_type, body )
if typeName is None:
typeName = '<unknown>'
+ else:
+ types_tool = getToolByName(self, 'portal_types')
+ typeName = types_tool.getTypeInfo(typeName).Type()
REQUEST[ 'RESPONSE' ].redirect( self.absolute_url()
+ '/manage_testRegistry'
- + '?testResults=Type:%s'
+ + '?testResults=Type:+%s'
% urllib.quote( typeName )
)