[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0

2017-09-24 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/380204 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
..


build: Updating mediawiki/mediawiki-codesniffer to 13.0.0

Change-Id: I768ba4d9887c2c221978d57f0c6f9e544e6617f4
---
M api/MWOAuthSessionProvider.php
M backend/MWOAuth.hooks.php
M backend/MWOAuthDataStore.php
M backend/MWOAuthRequest.php
M backend/MWOAuthServer.php
M backend/MWOAuthUtils.php
M composer.json
M frontend/EchoOAuthStageChangePresentationModel.php
M frontend/MWOAuthUI.hooks.php
M frontend/MWOAuthUIUtils.php
M frontend/specialpages/SpecialMWOAuth.php
M frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
M frontend/specialpages/SpecialMWOAuthListConsumers.php
M frontend/specialpages/SpecialMWOAuthManageConsumers.php
M frontend/specialpages/SpecialMWOAuthManageMyGrants.php
15 files changed, 23 insertions(+), 28 deletions(-)

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



diff --git a/api/MWOAuthSessionProvider.php b/api/MWOAuthSessionProvider.php
index 4b16f2d..f5cb4bf 100644
--- a/api/MWOAuthSessionProvider.php
+++ b/api/MWOAuthSessionProvider.php
@@ -87,7 +87,7 @@
}
 
$wiki = wfWikiID();
-   $dbr = MWOAuthUtils::getCentralDB( DB_SLAVE );
+   $dbr = MWOAuthUtils::getCentralDB( DB_REPLICA );
 
// Access token is for this wiki
$access = MWOAuthConsumerAcceptance::newFromToken( $dbr, 
$accesstoken->key );
@@ -263,7 +263,7 @@
public function onRecentChange_save( $rc ) {
$data = $this->getSessionData( $rc->getPerformer() ?: null );
if ( $data ) {
-   $dbr = MWOAuthUtils::getCentralDB( DB_SLAVE );
+   $dbr = MWOAuthUtils::getCentralDB( DB_REPLICA );
$access = MWOAuthConsumerAcceptance::newFromToken( 
$dbr, $data['key'] );
$consumerId = $access->get( 'consumerId' );
$consumer = MWOAuthConsumer::newFromId( $dbr, 
$consumerId );
diff --git a/backend/MWOAuth.hooks.php b/backend/MWOAuth.hooks.php
index e558571..42683e9 100644
--- a/backend/MWOAuth.hooks.php
+++ b/backend/MWOAuth.hooks.php
@@ -99,7 +99,7 @@
 */
public static function getUsedConsumerTags( $activeOnly, &$tags ) {
// Step 1: Get the list of (active) consumers' tags for this 
wiki
-   $db = MWOAuthUtils::getCentralDB( DB_SLAVE );
+   $db = MWOAuthUtils::getCentralDB( DB_REPLICA );
$conds = [
$db->makeList( [
'oarc_wiki = ' . $db->addQuotes( '*' ),
@@ -127,7 +127,7 @@
 
// Step 2: Return only those that are in use.
if ( $allTags ) {
-   $db = wfGetDB( DB_SLAVE );
+   $db = wfGetDB( DB_REPLICA );
$res = $db->select(
'change_tag',
[ 'ct_tag' ],
diff --git a/backend/MWOAuthDataStore.php b/backend/MWOAuthDataStore.php
index 338f0a8..02fbe00 100644
--- a/backend/MWOAuthDataStore.php
+++ b/backend/MWOAuthDataStore.php
@@ -3,7 +3,6 @@
 namespace MediaWiki\Extensions\OAuth;
 
 use MediaWiki\Logger\LoggerFactory;
-use Psr\Log\LoggerInterface;
 
 class MWOAuthDataStore extends OAuthDataStore {
/** @var \DBConnRef DB for the consumer/grant registry */
diff --git a/backend/MWOAuthRequest.php b/backend/MWOAuthRequest.php
index 102fbae..840ce50 100644
--- a/backend/MWOAuthRequest.php
+++ b/backend/MWOAuthRequest.php
@@ -3,7 +3,6 @@
 namespace MediaWiki\Extensions\OAuth;
 
 use MediaWiki\Logger\LoggerFactory;
-use Psr\Log\LoggerInterface;
 
 /**
  * @file
diff --git a/backend/MWOAuthServer.php b/backend/MWOAuthServer.php
index 6cc61d1..4905e29 100644
--- a/backend/MWOAuthServer.php
+++ b/backend/MWOAuthServer.php
@@ -385,7 +385,7 @@
 * @return MWOAuthConsumerAcceptance
 */
public function getCurrentAuthorization( \User $mwUser, $consumer, 
$wikiId ) {
-   $dbr = MWOAuthUtils::getCentralDB( DB_SLAVE );
+   $dbr = MWOAuthUtils::getCentralDB( DB_REPLICA );
 
$centralUserId = MWOAuthUtils::getCentralIdFromLocalUser( 
$mwUser );
if ( !$centralUserId ) {
diff --git a/backend/MWOAuthUtils.php b/backend/MWOAuthUtils.php
index c5c1546..dc2005c 100644
--- a/backend/MWOAuthUtils.php
+++ b/backend/MWOAuthUtils.php
@@ -192,7 +192,7 @@
 * @return MWOAuthServer with default configurations
 */
public static function newMWOAuthServer() {
-   $dbr = self::getCentralDB( DB_SLAVE );
+   $dbr = self::getCentralDB( DB_REPLICA );
$dbw = wfGetLB()->getServerCount() > 1 ? self::getCentralDB( 
DB_MASTER ) : null;

[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0

2017-09-23 Thread Libraryupgrader (Code Review)
Libraryupgrader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/380204 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
..

build: Updating mediawiki/mediawiki-codesniffer to 13.0.0

Change-Id: I768ba4d9887c2c221978d57f0c6f9e544e6617f4
---
M api/MWOAuthSessionProvider.php
M backend/MWOAuth.hooks.php
M backend/MWOAuthDataStore.php
M backend/MWOAuthRequest.php
M backend/MWOAuthServer.php
M backend/MWOAuthUtils.php
M composer.json
M frontend/EchoOAuthStageChangePresentationModel.php
M frontend/MWOAuthUI.hooks.php
M frontend/MWOAuthUIUtils.php
M frontend/specialpages/SpecialMWOAuth.php
M frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
M frontend/specialpages/SpecialMWOAuthListConsumers.php
M frontend/specialpages/SpecialMWOAuthManageConsumers.php
M frontend/specialpages/SpecialMWOAuthManageMyGrants.php
15 files changed, 23 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth 
refs/changes/04/380204/1

diff --git a/api/MWOAuthSessionProvider.php b/api/MWOAuthSessionProvider.php
index 4b16f2d..f5cb4bf 100644
--- a/api/MWOAuthSessionProvider.php
+++ b/api/MWOAuthSessionProvider.php
@@ -87,7 +87,7 @@
}
 
$wiki = wfWikiID();
-   $dbr = MWOAuthUtils::getCentralDB( DB_SLAVE );
+   $dbr = MWOAuthUtils::getCentralDB( DB_REPLICA );
 
// Access token is for this wiki
$access = MWOAuthConsumerAcceptance::newFromToken( $dbr, 
$accesstoken->key );
@@ -263,7 +263,7 @@
public function onRecentChange_save( $rc ) {
$data = $this->getSessionData( $rc->getPerformer() ?: null );
if ( $data ) {
-   $dbr = MWOAuthUtils::getCentralDB( DB_SLAVE );
+   $dbr = MWOAuthUtils::getCentralDB( DB_REPLICA );
$access = MWOAuthConsumerAcceptance::newFromToken( 
$dbr, $data['key'] );
$consumerId = $access->get( 'consumerId' );
$consumer = MWOAuthConsumer::newFromId( $dbr, 
$consumerId );
diff --git a/backend/MWOAuth.hooks.php b/backend/MWOAuth.hooks.php
index e558571..42683e9 100644
--- a/backend/MWOAuth.hooks.php
+++ b/backend/MWOAuth.hooks.php
@@ -99,7 +99,7 @@
 */
public static function getUsedConsumerTags( $activeOnly, &$tags ) {
// Step 1: Get the list of (active) consumers' tags for this 
wiki
-   $db = MWOAuthUtils::getCentralDB( DB_SLAVE );
+   $db = MWOAuthUtils::getCentralDB( DB_REPLICA );
$conds = [
$db->makeList( [
'oarc_wiki = ' . $db->addQuotes( '*' ),
@@ -127,7 +127,7 @@
 
// Step 2: Return only those that are in use.
if ( $allTags ) {
-   $db = wfGetDB( DB_SLAVE );
+   $db = wfGetDB( DB_REPLICA );
$res = $db->select(
'change_tag',
[ 'ct_tag' ],
diff --git a/backend/MWOAuthDataStore.php b/backend/MWOAuthDataStore.php
index 338f0a8..02fbe00 100644
--- a/backend/MWOAuthDataStore.php
+++ b/backend/MWOAuthDataStore.php
@@ -3,7 +3,6 @@
 namespace MediaWiki\Extensions\OAuth;
 
 use MediaWiki\Logger\LoggerFactory;
-use Psr\Log\LoggerInterface;
 
 class MWOAuthDataStore extends OAuthDataStore {
/** @var \DBConnRef DB for the consumer/grant registry */
diff --git a/backend/MWOAuthRequest.php b/backend/MWOAuthRequest.php
index 102fbae..840ce50 100644
--- a/backend/MWOAuthRequest.php
+++ b/backend/MWOAuthRequest.php
@@ -3,7 +3,6 @@
 namespace MediaWiki\Extensions\OAuth;
 
 use MediaWiki\Logger\LoggerFactory;
-use Psr\Log\LoggerInterface;
 
 /**
  * @file
diff --git a/backend/MWOAuthServer.php b/backend/MWOAuthServer.php
index 6cc61d1..4905e29 100644
--- a/backend/MWOAuthServer.php
+++ b/backend/MWOAuthServer.php
@@ -385,7 +385,7 @@
 * @return MWOAuthConsumerAcceptance
 */
public function getCurrentAuthorization( \User $mwUser, $consumer, 
$wikiId ) {
-   $dbr = MWOAuthUtils::getCentralDB( DB_SLAVE );
+   $dbr = MWOAuthUtils::getCentralDB( DB_REPLICA );
 
$centralUserId = MWOAuthUtils::getCentralIdFromLocalUser( 
$mwUser );
if ( !$centralUserId ) {
diff --git a/backend/MWOAuthUtils.php b/backend/MWOAuthUtils.php
index c5c1546..dc2005c 100644
--- a/backend/MWOAuthUtils.php
+++ b/backend/MWOAuthUtils.php
@@ -192,7 +192,7 @@
 * @return MWOAuthServer with default configurations
 */
public static function newMWOAuthServer() {
-   $dbr = self::getCentralDB( DB_SLAVE );
+   $dbr = self::getCentralDB( DB_REPLICA );
$dbw = wfGetLB()->getServerCount() > 1 ? self::getCentralDB( 
DB_MASTER ) : null;