X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fscopingnoticestream.php;h=c1651d5a30b1c347c33803091ddf441d5b65f1b3;hb=746e658f3e398948fe8c3f047e2b35ef6aa7ebd5;hp=30b80f10e57569866d4b50518a0ec61078e1058b;hpb=bae9eacaa1fae61509a1ea229486b5d4e8f0ef54;p=quix0rs-gnu-social.git diff --git a/lib/scopingnoticestream.php b/lib/scopingnoticestream.php index 30b80f10e5..c1651d5a30 100644 --- a/lib/scopingnoticestream.php +++ b/lib/scopingnoticestream.php @@ -73,4 +73,25 @@ class ScopingNoticeStream extends FilteringNoticeStream { return $notice->inScope($this->profile); } + + function prefill($notices) + { + // XXX: this should probably only be in the scoping one. + + 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)); + } + } }