]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/publicnoticestream.php
Merge branch 'nightly' into 'nightly'
[quix0rs-gnu-social.git] / lib / publicnoticestream.php
index 757c2164c08fc69af8e00bb9a24418d4b13899ec..2638292714fda2cc359f773dd556b5f840a4f404 100644 (file)
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET')) {
-    // This check helps protect against security problems;
-    // your code file can't be executed directly from the web.
-    exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 /**
  * Public stream
@@ -45,13 +41,13 @@ if (!defined('STATUSNET')) {
  * @link      http://status.net/
  */
 
-class PublicNoticeStream extends ScopingNoticeStream
+class PublicNoticeStream extends ModeratedNoticeStream
 {
-    function __construct($profile=null)
+    function __construct(Profile $scoped=null)
     {
         parent::__construct(new CachingNoticeStream(new RawPublicNoticeStream(),
                                                     'public'),
-                            $profile);
+                            $scoped);
     }
 }
 
@@ -66,7 +62,7 @@ class PublicNoticeStream extends ScopingNoticeStream
  * @link      http://status.net/
  */
 
-class RawPublicNoticeStream extends NoticeStream
+class RawPublicNoticeStream extends FullNoticeStream
 {
     function getNoticeIds($offset, $limit, $since_id, $max_id)
     {
@@ -87,9 +83,7 @@ class RawPublicNoticeStream extends NoticeStream
         Notice::addWhereSinceId($notice, $since_id);
         Notice::addWhereMaxId($notice, $max_id);
 
-        if (!empty($this->selectVerbs)) {
-            $notice->whereAddIn('verb', $this->selectVerbs, $notice->columnType('verb'));
-        }
+        self::filterVerbs($notice, $this->selectVerbs);
 
         $ids = array();