]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/profilenoticestream.php
NoAcctUriException->profile not $e directly
[quix0rs-gnu-social.git] / lib / profilenoticestream.php
index 38b16859f7f8b1e89ea977e8d8c5dc799cc7ca43..7ff4163fcbc96dbdde5b583219872ef46a886591 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); }
 
 /**
  * Stream of notices by a profile
@@ -114,6 +110,7 @@ class ProfileNoticeStream extends ScopingNoticeStream
 class RawProfileNoticeStream extends NoticeStream
 {
     protected $profile;
+    protected $selectVerbs = array();   // select all verbs
 
     function __construct($profile)
     {
@@ -133,12 +130,7 @@ class RawProfileNoticeStream extends NoticeStream
         Notice::addWhereSinceId($notice, $since_id);
         Notice::addWhereMaxId($notice, $max_id);
 
-        if (!empty($this->selectVerbs)) {
-            $notice->whereAddIn('verb', $this->selectVerbs, $notice->columnType('verb'));
-        }
-        if (!empty($this->unselectVerbs)) {
-            $notice->whereAddIn('!verb', $this->unselectVerbs, $notice->columnType('verb'));
-        }
+        self::filterVerbs($notice, $this->selectVerbs);
 
         $notice->orderBy('created DESC, id DESC');