X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fprofilenoticestream.php;h=7ff4163fcbc96dbdde5b583219872ef46a886591;hb=543d968b81b97c9ebd46de063d8d70621c12015b;hp=38b16859f7f8b1e89ea977e8d8c5dc799cc7ca43;hpb=9accd953e4f20ff1c51e1bfc81d6bdd75acf09d5;p=quix0rs-gnu-social.git diff --git a/lib/profilenoticestream.php b/lib/profilenoticestream.php index 38b16859f7..7ff4163fcb 100644 --- a/lib/profilenoticestream.php +++ b/lib/profilenoticestream.php @@ -28,11 +28,7 @@ * @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');