[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make ApiMain use isBot() to catch global bots in checkReadOn...

2016-09-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make ApiMain use isBot() to catch global bots in checkReadOnly()
..


Make ApiMain use isBot() to catch global bots in checkReadOnly()

Change-Id: I2090b1aad8a5858965e4ec261f8e88c37414e804
---
M includes/api/ApiMain.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Gilles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index 1f3c76a..ae3f3f2 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -1299,7 +1299,7 @@
}
 
if ( $module->isWriteMode()
-   && in_array( 'bot', $this->getUser()->getGroups() )
+   && $this->getUser()->isBot()
&& wfGetLB()->getServerCount() > 1
) {
$this->checkBotReadOnly();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2090b1aad8a5858965e4ec261f8e88c37414e804
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make ApiMain use isBot() to catch global bots in checkReadOn...

2016-09-18 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Make ApiMain use isBot() to catch global bots in checkReadOnly()
..

Make ApiMain use isBot() to catch global bots in checkReadOnly()

Change-Id: I2090b1aad8a5858965e4ec261f8e88c37414e804
---
M includes/api/ApiMain.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/48/311348/1

diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index 1f3c76a..ae3f3f2 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -1299,7 +1299,7 @@
}
 
if ( $module->isWriteMode()
-   && in_array( 'bot', $this->getUser()->getGroups() )
+   && $this->getUser()->isBot()
&& wfGetLB()->getServerCount() > 1
) {
$this->checkBotReadOnly();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2090b1aad8a5858965e4ec261f8e88c37414e804
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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