[CMF-checkins] CVS: Products/CMFDefault - DiscussionItem.py:1.42
Jens Vagelpohl
jens at dataflake.org
Sat Aug 7 08:59:03 EDT 2004
Update of /cvs-repository/Products/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv11236/CMFDefault
Modified Files:
DiscussionItem.py
Log Message:
- CMFDefault.DiscussionItem: Replies were not sorted chronologically
(http://www.zope.org/Collectors/CMF/211)
=== Products/CMFDefault/DiscussionItem.py 1.41 => 1.42 ===
--- Products/CMFDefault/DiscussionItem.py:1.41 Thu Apr 29 12:13:17 2004
+++ Products/CMFDefault/DiscussionItem.py Sat Aug 7 08:59:03 2004
@@ -427,8 +427,11 @@
a = result.append
for key, value in self._container.items():
if value.in_reply_to == in_reply_to:
- a( key )
+ a( ( key, value ) )
+
+ result.sort( lambda a, b: cmp(a[1].creation_date, b[1].creation_date) )
+
+ return [ x[0] for x in result ]
- return result
InitializeClass( DiscussionItemContainer )
More information about the CMF-checkins
mailing list