* 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
* @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);
}
}