X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fprofilenoticestream.php;h=64cd31abc48d64f5d83276c5b2ea8db95b8d7d9b;hb=03791eca892a50c7bbb3cc922050dd46c4ed7390;hp=9324bfb85d61f0ce2951b9424ed6a84033564cb6;hpb=22bf63bb469327f77708d734d7277274ed4735ef;p=quix0rs-gnu-social.git diff --git a/lib/profilenoticestream.php b/lib/profilenoticestream.php index 9324bfb85d..64cd31abc4 100644 --- a/lib/profilenoticestream.php +++ b/lib/profilenoticestream.php @@ -4,7 +4,7 @@ * Copyright (C) 2011, StatusNet, Inc. * * Stream of notices by a profile - * + * * PHP version 5 * * This program is free software: you can redistribute it and/or modify @@ -45,12 +45,16 @@ if (!defined('STATUSNET')) { * @link http://status.net/ */ -class ProfileNoticeStream extends CachingNoticeStream +class ProfileNoticeStream extends ScopingNoticeStream { - function __construct($profile) + function __construct($profile, $userProfile = -1) { - parent::__construct(new RawProfileNoticeStream($profile), - 'profile:notice_ids:' . $profile->id); + if (is_int($userProfile) && $userProfile == -1) { + $userProfile = Profile::current(); + } + parent::__construct(new CachingNoticeStream(new RawProfileNoticeStream($profile), + 'profile:notice_ids:' . $profile->id), + $userProfile); } }