X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ffavenoticestream.php;h=6527e5441e37cc8dd5c11acb9bd1e6f93b1c8c4c;hb=360492472c7f5424670b01541ebc4ddc87ff27e3;hp=987805cf9d970246f9cd8192474f811fb28ac44d;hpb=c1fd36c043d97dff7e16f209e7798813c297db64;p=quix0rs-gnu-social.git diff --git a/lib/favenoticestream.php b/lib/favenoticestream.php index 987805cf9d..6527e5441e 100644 --- a/lib/favenoticestream.php +++ b/lib/favenoticestream.php @@ -44,10 +44,9 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ - class FaveNoticeStream extends ScopingNoticeStream { - function __construct($user_id, $own) + function __construct($user_id, $own, $profile = -1) { $stream = new RawFaveNoticeStream($user_id, $own); if ($own) { @@ -55,7 +54,11 @@ class FaveNoticeStream extends ScopingNoticeStream } else { $key = 'fave:ids_by_user:'.$user_id; } - parent::__construct(new CachingNoticeStream($stream, $key)); + if (is_int($profile) && $profile == -1) { + $profile = Profile::current(); + } + parent::__construct(new CachingNoticeStream($stream, $key), + $profile); } } @@ -69,7 +72,6 @@ class FaveNoticeStream extends ScopingNoticeStream * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ - class RawFaveNoticeStream extends NoticeStream { protected $user_id;