forked from GNUsocial/gnu-social
Prefill profile roles when checking scope
This commit is contained in:
parent
b1555fe373
commit
4ea9a0a7e8
@ -151,20 +151,6 @@ class NoticeList extends Widget
|
|||||||
Memcached_DataObject::pivotGet('Notice', 'repeat_of', $ids, array('profile_id' => $p->id));
|
Memcached_DataObject::pivotGet('Notice', 'repeat_of', $ids, array('profile_id' => $p->id));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (common_config('notice', 'hidespam')) {
|
|
||||||
|
|
||||||
$pids = array();
|
|
||||||
|
|
||||||
foreach ($profiles as $profile) {
|
|
||||||
$pids[] = $profile->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
Memcached_DataObject::pivotGet('Profile_role',
|
|
||||||
'profile_id',
|
|
||||||
$pids,
|
|
||||||
array('role' => Profile_role::SILENCED));
|
|
||||||
}
|
|
||||||
|
|
||||||
Event::handle('EndNoticeListPrefill', array(&$notices, &$profiles, $avatarSize));
|
Event::handle('EndNoticeListPrefill', array(&$notices, &$profiles, $avatarSize));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,5 +80,19 @@ class ScopingNoticeStream extends FilteringNoticeStream
|
|||||||
|
|
||||||
Notice::fillGroups($notices);
|
Notice::fillGroups($notices);
|
||||||
Notice::fillReplies($notices);
|
Notice::fillReplies($notices);
|
||||||
|
|
||||||
|
if (common_config('notice', 'hidespam')) {
|
||||||
|
|
||||||
|
$profiles = Notice::getProfiles($notices);
|
||||||
|
|
||||||
|
foreach ($profiles as $profile) {
|
||||||
|
$pids[] = $profile->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
Memcached_DataObject::pivotGet('Profile_role',
|
||||||
|
'profile_id',
|
||||||
|
$pids,
|
||||||
|
array('role' => Profile_role::SILENCED));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user