[CMF-checkins] CVS: Products/CMFDefault/skins/zpt_generic - permalink.py:1.2

Yvo Schubbe y.2004_ at wcm-solutions.de
Wed Sep 8 03:42:14 EDT 2004


Update of /cvs-repository/Products/CMFDefault/skins/zpt_generic
In directory cvs.zope.org:/tmp/cvs-serv13137/CMFDefault/skins/zpt_generic

Modified Files:
	permalink.py 
Log Message:
I'm still not happy with having this in the 'Basic' skin, but at least it should not use the deprecated API.


=== Products/CMFDefault/skins/zpt_generic/permalink.py 1.1 => 1.2 ===
--- Products/CMFDefault/skins/zpt_generic/permalink.py:1.1	Fri Aug  6 19:01:27 2004
+++ Products/CMFDefault/skins/zpt_generic/permalink.py	Wed Sep  8 03:42:14 2004
@@ -11,10 +11,9 @@
 
 uid_handler = getToolByName(context, 'portal_uidhandler')
 obj = uid_handler.getObject(traverse_subpath[0])
-portal_type = obj.getPortalTypeName()
 
-ptypes = getToolByName(context, 'portal_types')
-method = ptypes[portal_type].getActionById('view', None)
-if method:
-    return getattr(obj, method)()
+ti = obj.getTypeInfo()
+method_id = ti and ti.queryMethodID('view')
+if method_id:
+    return getattr(obj, method_id)()
 return obj()



More information about the CMF-checkins mailing list