From 578d08d84eb4d3e15abab7cc589709fcc06ac6e6 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 18 Sep 2016 14:01:42 -0700 Subject: [PATCH] Make ApiMain use isBot() to catch global bots in checkReadOnly() Change-Id: I2090b1aad8a5858965e4ec261f8e88c37414e804 --- includes/api/ApiMain.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 1f3c76a636..ae3f3f2458 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -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(); -- 2.20.1