]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
quick hack -- switch order on inline convo view (comments in forward chron)
authorBrion Vibber <brion@pobox.com>
Mon, 28 Feb 2011 19:59:37 +0000 (11:59 -0800)
committerBrion Vibber <brion@pobox.com>
Mon, 28 Feb 2011 19:59:37 +0000 (11:59 -0800)
lib/threadednoticelist.php

index 1af778721d44470baa556e5d2c55a87dd73491e5..3a6e5e76c4d89473134da9b1717bf0c8312cf6ab 100644 (file)
@@ -156,19 +156,25 @@ class ThreadedNoticeListItem extends NoticeListItem
     function showEnd()
     {
         $notice = Notice::conversationStream($this->notice->conversation);
-
-        $this->out->elementStart('ul', 'notices threaded-notices xoxo');
+        $notices = array();
         while ($notice->fetch()) {
             if ($notice->id == $this->notice->id) {
                 // Skip!
                 continue;
             }
-            $this->out->elementStart('li');
-            $item = new NoticeListItem($notice, $this->out);
-            $item->show();
-            $this->out->elementEnd('li');
+            $notices[] = clone($notice); // *grumble* inefficient as hell
+        }
+
+        if ($notices) {
+            $this->out->elementStart('ul', 'notices threaded-notices xoxo');
+            foreach (array_reverse($notices) as $notice) {
+                $this->out->elementStart('li');
+                $item = new NoticeListItem($notice, $this->out);
+                $item->show();
+                $this->out->elementEnd('li');
+            }
+            $this->out->elementEnd('ul');
         }
-        $this->out->elementEnd('ul');
 
         parent::showEnd();
     }