X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ffilenoticestream.php;h=49b93732fbc091e253299df0fb47050ec24be820;hb=8c9efff1ace2d5e466691abf038f096eb5dd5f51;hp=fba6183fc22c98d84c6d735731cd91ce98952c7b;hpb=d7f96307dc84b49cce11f63260002dc77ef9641f;p=quix0rs-gnu-social.git diff --git a/lib/filenoticestream.php b/lib/filenoticestream.php index fba6183fc2..49b93732fb 100644 --- a/lib/filenoticestream.php +++ b/lib/filenoticestream.php @@ -28,22 +28,15 @@ * @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); } class FileNoticeStream extends ScopingNoticeStream { - function __construct($file, $profile = -1) + function __construct($file, Profile $scoped=null) { - if (is_int($profile) && $profile == -1) { - $profile = Profile::current(); - } parent::__construct(new CachingNoticeStream(new RawFileNoticeStream($file), - 'file:notice-ids:'.$this->url), - $profile); + 'file:notice-ids:'.$file->id), + $scoped); } }