X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsearchnoticestream.php;h=9c31a709c64366bc2b41dc57199cf4e5326f4567;hb=b4271a3533bdf12329f27dd75452c1ef2a6ee3d1;hp=6593a4c86087ebfaddba661281f10acadba57239;hpb=7a9777df053a9007b5eaa71f5437584065b615a5;p=quix0rs-gnu-social.git diff --git a/lib/searchnoticestream.php b/lib/searchnoticestream.php index 6593a4c860..9c31a709c6 100644 --- a/lib/searchnoticestream.php +++ b/lib/searchnoticestream.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 notice search results @@ -47,13 +43,9 @@ if (!defined('STATUSNET')) { class SearchNoticeStream extends ScopingNoticeStream { - function __construct($q, $profile = -1) + function __construct($q, Profile $scoped=null) { - if (is_int($profile) && $profile == -1) { - $profile = Profile::current(); - } - - parent::__construct(new RawSearchNoticeStream($q), $profile); + parent::__construct(new RawSearchNoticeStream($q), $scoped); } } @@ -89,4 +81,4 @@ class RawSearchNoticeStream extends NoticeStream return $ids; } -} \ No newline at end of file +}