]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/publicnoticestream.php
Improved type-hint for following methods:
[quix0rs-gnu-social.git] / lib / publicnoticestream.php
index 5c8d313d46591dd3650d80a6bd78352a9aceca48..34f7b4a1defb69d558bd6949118496cff3aa147f 100644 (file)
@@ -47,10 +47,11 @@ if (!defined('STATUSNET')) {
 
 class PublicNoticeStream extends ScopingNoticeStream
 {
-    function __construct()
+    function __construct($profile=null)
     {
         parent::__construct(new CachingNoticeStream(new RawPublicNoticeStream(),
-                                                    'public'));
+                                                    'public'),
+                            $profile);
     }
 }
 
@@ -91,6 +92,10 @@ 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'));
+        }
+
         $ids = array();
 
         if ($notice->find()) {
@@ -104,4 +109,4 @@ class RawPublicNoticeStream extends NoticeStream
 
         return $ids;
     }
-}
\ No newline at end of file
+}