X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Frepeatsofmenoticestream.php;h=ec80d8431447c10fadb929728ecc4f04055fa908;hb=d7c40e77b2001678f5836e22ba3369b958a8352c;hp=1441908e5aeb6e41b2ac9fe038217fa89c082987;hpb=0c3f8208cdccc4a402d976a53628f00652b2e50e;p=quix0rs-gnu-social.git diff --git a/lib/repeatsofmenoticestream.php b/lib/repeatsofmenoticestream.php index 1441908e5a..ec80d84314 100644 --- a/lib/repeatsofmenoticestream.php +++ b/lib/repeatsofmenoticestream.php @@ -1,14 +1,73 @@ . + * + * @category Stream + * @package StatusNet + * @author Evan Prodromou + * @copyright 2011 StatusNet, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 + * @link http://status.net/ + */ -class RepeatsOfMeNoticeStream extends CachingNoticeStream +if (!defined('STATUSNET')) { + // This check helps protect against security problems; + // your code file can't be executed directly from the web. + exit(1); +} + +/** + * Stream of notices that are repeats of mine + * + * @category Stream + * @package StatusNet + * @author Evan Prodromou + * @copyright 2011 StatusNet, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 + * @link http://status.net/ + */ + +class RepeatsOfMeNoticeStream extends ScopingNoticeStream { - function __construct($user) + function __construct($user, $profile=-1) { - parent::__construct(new RawRepeatsOfMeNoticeStream($user), - 'user:repeats_of_me:'.$user->id); + if (is_int($profile) && $profile == -1) { + $profile = Profile::current(); + } + parent::__construct(new CachingNoticeStream(new RawRepeatsOfMeNoticeStream($user), + 'user:repeats_of_me:'.$user->id), + $profile); } } +/** + * Raw stream of notices that are repeats of mine + * + * @category Stream + * @package StatusNet + * @author Evan Prodromou + * @copyright 2011 StatusNet, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 + * @link http://status.net/ + */ class RawRepeatsOfMeNoticeStream extends NoticeStream { protected $user;