]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Revert "Paging fix for public timeline: drop replies from the stuff we pull in for...
authorEvan Prodromou <evan@status.net>
Tue, 5 Apr 2011 16:53:49 +0000 (12:53 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 5 Apr 2011 16:53:49 +0000 (12:53 -0400)
This reverts commit 880661de4e8fd6735e9eba57e059fca0c719666b.

actions/public.php
lib/publicnoticestream.php

index 1b6c14b2e6676842ef81e62135cf0db5ab0218c5..b0294072504d9c5cca88c16cce6e6b89fca99bf1 100644 (file)
@@ -85,11 +85,8 @@ class PublicAction extends Action
 
         common_set_returnto($this->selfUrl());
 
-        $stream = new PublicNoticeStream(PublicNoticeStream::THREADED);
-        $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE,
-                                            NOTICES_PER_PAGE + 1,
-                                            0,
-                                            0);
+        $this->notice = Notice::publicStream(($this->page-1)*NOTICES_PER_PAGE,
+                                       NOTICES_PER_PAGE + 1);
 
         if (!$this->notice) {
             // TRANS: Server error displayed when a public timeline cannot be retrieved.
index 08ac790fabf7889270f0a07b9f47dbd709818d13..5c8d313d46591dd3650d80a6bd78352a9aceca48 100644 (file)
@@ -47,16 +47,10 @@ if (!defined('STATUSNET')) {
 
 class PublicNoticeStream extends ScopingNoticeStream
 {
-    const THREADED=true;
-
-    /**
-     *
-     * @param boolean $threaded set to true to exclude replies, for later fetching
-     */
-    function __construct($threaded=false)
+    function __construct()
     {
-        parent::__construct(new CachingNoticeStream(new RawPublicNoticeStream($threaded),
-                                                    $threaded ? 'public:threaded' : 'public'));
+        parent::__construct(new CachingNoticeStream(new RawPublicNoticeStream(),
+                                                    'public'));
     }
 }
 
@@ -73,13 +67,6 @@ class PublicNoticeStream extends ScopingNoticeStream
 
 class RawPublicNoticeStream extends NoticeStream
 {
-    var $threaded;
-
-    function __construct($threaded=false)
-    {
-        $this->threaded = $threaded;
-    }
-
     function getNoticeIds($offset, $limit, $since_id, $max_id)
     {
         $notice = new Notice();
@@ -100,9 +87,6 @@ class RawPublicNoticeStream extends NoticeStream
             $notice->whereAdd('is_local !='. Notice::LOCAL_NONPUBLIC);
             $notice->whereAdd('is_local !='. Notice::GATEWAY);
         }
-        if ($this->threaded) {
-            $notice->whereAdd('reply_to IS NULL');
-        }
 
         Notice::addWhereSinceId($notice, $since_id);
         Notice::addWhereMaxId($notice, $max_id);