From: Aaron Schulz Date: Sun, 18 Sep 2016 21:01:42 +0000 (-0700) Subject: Make ApiMain use isBot() to catch global bots in checkReadOnly() X-Git-Tag: 1.31.0-rc.0~5488^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=578d08d84eb4d3e15abab7cc589709fcc06ac6e6;p=lhc%2Fweb%2Fwiklou.git Make ApiMain use isBot() to catch global bots in checkReadOnly() Change-Id: I2090b1aad8a5858965e4ec261f8e88c37414e804 --- 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();