Merge "Make ApiMain use isBot() to catch global bots in checkReadOnly()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 19 Sep 2016 08:34:56 +0000 (08:34 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 19 Sep 2016 08:34:56 +0000 (08:34 +0000)
includes/api/ApiMain.php

index 1f3c76a..ae3f3f2 100644 (file)
@@ -1299,7 +1299,7 @@ class ApiMain extends ApiBase {
                }
 
                if ( $module->isWriteMode()
-                       && in_array( 'bot', $this->getUser()->getGroups() )
+                       && $this->getUser()->isBot()
                        && wfGetLB()->getServerCount() > 1
                ) {
                        $this->checkBotReadOnly();