[CMF-checkins] CVS: CMF - Topic.py:1.19.2.1
tseaver@digicool.com
tseaver@digicool.com
Tue, 5 Jun 2001 17:56:05 -0400 (EDT)
Update of /cvs-repository/CMF/CMFTopic
In directory korak.digicool.com:/tmp/cvs-serv9653/CMFTopic
Modified Files:
Tag: alltypes_branch
Topic.py
Log Message:
- Make it possible to map "normal" Zope objects as content
(Tracker #283):
o Skin and tool code which currently queries the object
for its Type in order to then ask the types tool for
a TypeInfo object should instead just ask the types tool
for type TypeInfo object directly.
o Modify the TypesTool interface to signal that passing an
object to 'getTypeInfo' is acceptable, with the semantic
that the tool will attempt to find a TypeInfo object based
on the tool's type or metatype.
--- Updated File Topic.py in package CMF --
--- Topic.py 2001/05/09 20:47:29 1.19
+++ Topic.py 2001/06/05 21:56:04 1.19.2.1
@@ -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)