[CMF-checkins] CVS: CMF - Topic.py:1.20

tseaver@digicool.com tseaver@digicool.com
Wed, 6 Jun 2001 20:23:47 -0400 (EDT)


Update of /cvs-repository/CMF/CMFTopic
In directory korak.digicool.com:/tmp/cvs-serv13413/CMFTopic

Modified Files:
	Topic.py 
Log Message:


 - Merge changes to permit mapping non-CMF classes onto content
   types (Tracker #283).



--- Updated File Topic.py in package CMF --
--- Topic.py	2001/05/09 20:47:29	1.19
+++ Topic.py	2001/06/07 00:23:45	1.20
@@ -164,7 +164,8 @@
         '''
         Invokes the action identified by the id "view" or the first action.
         '''
-        ti = self.getTypeInfo()
+        tool = getToolByName( self, 'portal_types' )
+        ti = tool.getTypeInfo( self )
         if ti is not None:
             path = ti.getActionById('view', None)
             if path is not None:
@@ -296,7 +297,8 @@
     security.declareProtected(TopicPermissions.AddTopics, 'addSubtopic')
     def addSubtopic(self, id):
         """ Add a new subtopic """
-        topictype = self.getTypeInfo()
+        tool = getToolByName( self, 'portal_types' )
+        topictype = tool.getTypeInfo(self)
         topictype.constructInstance(self, id)
 
         return self._getOb(id)