mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-15 02:03:53 +00:00
Merge "Performance: don't check autopromotion if blockautopromote is disabled"
This commit is contained in:
commit
f5950e638f
|
@ -263,7 +263,9 @@ class AbuseFilterHooks {
|
|||
* @param array &$promote
|
||||
*/
|
||||
public static function onGetAutoPromoteGroups( User $user, &$promote ) {
|
||||
if ( $promote ) {
|
||||
global $wgAbuseFilterActions;
|
||||
|
||||
if ( ( $wgAbuseFilterActions['blockautopromote'] ?? false ) && $promote ) {
|
||||
$cache = ObjectCache::getInstance( 'hash' );
|
||||
$key = AbuseFilter::autoPromoteBlockKey( $cache, $user );
|
||||
$blocked = (bool)$cache->getWithSetCallback(
|
||||
|
|
Loading…
Reference in a new issue