X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fauth%2FAuthManager.php;h=af070c25cbbd064f5f6a8a5cb0c95a117abcda50;hb=5859eff1b0c6e2438f4e21a4532e7f547d7cf2c2;hp=c3f798fd49786f146b382b6c5e915844509e805e;hpb=3458091bfe2c9602a4ee62724626a884d7e090bf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/auth/AuthManager.php b/includes/auth/AuthManager.php index c3f798fd49..af070c25cb 100644 --- a/includes/auth/AuthManager.php +++ b/includes/auth/AuthManager.php @@ -975,7 +975,7 @@ class AuthManager implements LoggerAwareInterface { public function checkAccountCreatePermissions( User $creator ) { // Wiki is read-only? if ( wfReadOnly() ) { - return Status::newFatal( 'readonlytext', wfReadOnlyReason() ); + return Status::newFatal( wfMessage( 'readonlytext', wfReadOnlyReason() ) ); } // This is awful, this permission check really shouldn't go through Title. @@ -1551,7 +1551,10 @@ class AuthManager implements LoggerAwareInterface { // Fetch the user ID from the master, so that we don't try to create the user // when they already exist, due to replication lag // @codeCoverageIgnoreStart - if ( !$localId && wfGetLB()->getReaderIndex() != 0 ) { + if ( + !$localId && + MediaWikiServices::getInstance()->getDBLoadBalancer()->getReaderIndex() != 0 + ) { $localId = User::idFromName( $username, User::READ_LATEST ); $flags = User::READ_LATEST; } @@ -1579,7 +1582,7 @@ class AuthManager implements LoggerAwareInterface { ] ); $user->setId( 0 ); $user->loadFromId(); - return Status::newFatal( 'readonlytext', wfReadOnlyReason() ); + return Status::newFatal( wfMessage( 'readonlytext', wfReadOnlyReason() ) ); } // Check the session, if we tried to create this user already there's @@ -2131,7 +2134,7 @@ class AuthManager implements LoggerAwareInterface { * @param AuthenticationRequest[] &$reqs * @param string $action * @param string|null $username - * @param boolean $forceAction + * @param bool $forceAction */ private function fillRequests( array &$reqs, $action, $username, $forceAction = false ) { foreach ( $reqs as $req ) {