[CMF-checkins] CVS: Products/CMFTopic - Topic.py:1.44.2.2
Jens Vagelpohl
jens at dataflake.org
Mon May 9 16:18:15 EDT 2005
Update of /cvs-repository/Products/CMFTopic
In directory cvs.zope.org:/tmp/cvs-serv15154/CMFTopic
Modified Files:
Tag: CMF-1_5-branch
Topic.py
Log Message:
- CMFTopic.Topic/CMFCore.PortalContent: Clean up a previous change
by changing __call__ methods to be aligned with what's on CVS
HEAD and using the old _getViewFor function as a fallback to
retain backwards compatibility.
=== Products/CMFTopic/Topic.py 1.44.2.1 => 1.44.2.2 ===
--- Products/CMFTopic/Topic.py:1.44.2.1 Thu May 5 16:53:32 2005
+++ Products/CMFTopic/Topic.py Mon May 9 16:18:15 2005
@@ -110,16 +110,19 @@
_criteriaTypes = []
def __call__( self ):
-
""" Invoke the default action.
"""
- view_id = self.getTypeInfo().queryMethodID('view')
- view_obj = self.unrestrictedTraverse(view_id)
+ ti = self.getTypeInfo()
+ method_id = ti and ti.queryMethodID('(Default)')
+ if method_id:
+ method = getattr(self, method_id)
+ else:
+ method = _getViewFor(self)
- if getattr( aq_base( view_obj ), 'isDocTemp', 0 ):
- return view_obj(self, self.REQUEST)
+ if getattr(aq_base(method), 'isDocTemp', 0):
+ return method(self, self.REQUEST)
else:
- return view_obj()
+ return method()
index_html = None # This special value informs ZPublisher to use __call__
More information about the CMF-checkins
mailing list