123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class ScopingNoticeStream extends FilteringNoticeStream
- {
- protected $profile;
- function __construct(NoticeStream $upstream, Profile $scoped=null)
- {
- parent::__construct($upstream);
- $this->profile = $scoped;
- $this->scoped = $scoped;
- }
-
- protected function filter(Notice $notice)
- {
- return $notice->inScope($this->scoped);
- }
- function prefill($notices)
- {
-
-
- Notice::fillGroups($notices);
- Notice::fillReplies($notices);
- if (common_config('notice', 'hidespam')) {
- $profiles = Notice::getProfiles($notices);
- foreach ($profiles as $profile) {
- $pids[] = $profile->id;
- }
-
- Profile_role::pivotGet('profile_id',
- $pids,
- array('role' => Profile_role::SILENCED));
- }
- }
- }
|