X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fpublicnoticestream.php;h=1dd59059fd7e357f8ce2c2d1676ec6ea391c44ff;hb=b4271a3533bdf12329f27dd75452c1ef2a6ee3d1;hp=757c2164c08fc69af8e00bb9a24418d4b13899ec;hpb=a5d27d9ce700d24d8fd2493a4b988cfe22d247e6;p=quix0rs-gnu-social.git diff --git a/lib/publicnoticestream.php b/lib/publicnoticestream.php index 757c2164c0..1dd59059fd 100644 --- a/lib/publicnoticestream.php +++ b/lib/publicnoticestream.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); } /** * Public stream @@ -47,11 +43,11 @@ if (!defined('STATUSNET')) { class PublicNoticeStream extends ScopingNoticeStream { - 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();