Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/288755

Change subject: Make negative process caching in onGetAutoPromoteGroups() work
......................................................................

Make negative process caching in onGetAutoPromoteGroups() work

Storing "false" is not allowed, so this resulted in duplicate fech log
warnings in that case.

Change-Id: I985700f8c42773569e53b54820b972e50be776ba
---
M AbuseFilter.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/55/288755/1

diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php
index 77eca8e..8177f54 100644
--- a/AbuseFilter.hooks.php
+++ b/AbuseFilter.hooks.php
@@ -279,11 +279,11 @@
        public static function onGetAutoPromoteGroups( $user, &$promote ) {
                if ( $promote ) {
                        $key = AbuseFilter::autoPromoteBlockKey( $user );
-                       $blocked = ObjectCache::getInstance( 'hash' 
)->getWithSetCallback(
+                       $blocked = (bool)ObjectCache::getInstance( 'hash' 
)->getWithSetCallback(
                                $key,
                                30,
                                function () use ( $key ) {
-                                       return 
ObjectCache::getMainStashInstance()->get( $key );
+                                       return 
(int)ObjectCache::getMainStashInstance()->get( $key );
                                }
                        );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/288755
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I985700f8c42773569e53b54820b972e50be776ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to