[CMF-checkins] CVS: Products/CMFDefault - DiscussionItem.py:1.33.4.3

Jens Vagelpohl jens at dataflake.org
Sat Aug 7 08:59:42 EDT 2004


Update of /cvs-repository/Products/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv11468/CMFDefault

Modified Files:
      Tag: CMF-1_4-branch
	DiscussionItem.py 
Log Message:
- CMFDefault.DiscussionItem: Replies were not sorted chronologically
  (http://www.zope.org/Collectors/CMF/211)


=== Products/CMFDefault/DiscussionItem.py 1.33.4.2 => 1.33.4.3 ===
--- Products/CMFDefault/DiscussionItem.py:1.33.4.2	Thu Apr 22 13:47:50 2004
+++ Products/CMFDefault/DiscussionItem.py	Sat Aug  7 08:59:42 2004
@@ -434,8 +434,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