Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/351790 )

Change subject: Add $flags parameter to renameInProgressOn() Bug: T88144
......................................................................

Add $flags parameter to renameInProgressOn()
Bug: T88144

Change-Id: Ia705bb2f5d8ae5fcd0cd28162588c109161d55af
---
M includes/CentralAuthPrimaryAuthenticationProvider.php
M includes/CentralAuthUser.php
2 files changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/90/351790/1

diff --git a/includes/CentralAuthPrimaryAuthenticationProvider.php 
b/includes/CentralAuthPrimaryAuthenticationProvider.php
index 83a983f..d28fe55 100644
--- a/includes/CentralAuthPrimaryAuthenticationProvider.php
+++ b/includes/CentralAuthPrimaryAuthenticationProvider.php
@@ -390,7 +390,7 @@
                        : CentralAuthUser::getInstance( $user );
 
                // Rename in progress?
-               if ( $centralUser->renameInProgressOn( wfWikiID() ) ) {
+               if ( $centralUser->renameInProgressOn( wfWikiID(), 
$options['flags'] ) ) {
                        $status->fatal( 'centralauth-rename-abortlogin' );
                        return $status;
                }
diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index 1934ef1..53701a2 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -2210,13 +2210,17 @@
         * Not cached
         * @see CentralAuthUser::renameInProgress
         * @param string $wiki
+        * @param integer $flags Bitfield of CentralAuthUser::READ_* constants
         * @return array|bool
         */
-       public function renameInProgressOn( $wiki ) {
+       public function renameInProgressOn( $wiki, $flags = 0 ) {
                $renameState = new GlobalRenameUserStatus( $this->mName );
 
                // Use master as this is being used for various critical things
-               $names = $renameState->getNames( $wiki, 'master' );
+               $names = $renameState->getNames(
+                       $wiki,
+                       ( $flags & self::READ_LATEST ) == self::READ_LATEST ? 
'master' : 'slave'
+               );
 
                if ( $names ) {
                        return $names;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia705bb2f5d8ae5fcd0cd28162588c109161d55af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to