]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/publicnoticestream.php
Caching fixes for Fave class
[quix0rs-gnu-social.git] / lib / publicnoticestream.php
index 08ac790fabf7889270f0a07b9f47dbd709818d13..044701aaf68bb2b7e983a2ec4e8837910b6bd446 100644 (file)
@@ -47,16 +47,11 @@ 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($profile=null)
     {
-        parent::__construct(new CachingNoticeStream(new RawPublicNoticeStream($threaded),
-                                                    $threaded ? 'public:threaded' : 'public'));
+        parent::__construct(new CachingNoticeStream(new RawPublicNoticeStream(),
+                                                    'public'),
+                            $profile);
     }
 }
 
@@ -73,13 +68,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 +88,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);