X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=includes%2Fauth%2FAuthManager.php;h=818f778301a87e379ee2e82b5cfcfebf557cf710;hb=38fce189c441a075172eef516f25e81b8d1a5ada;hp=d88a5b27e2ff5ee939969bd099291ad7102f402c;hpb=2fdcd7bfdd95a3b1515b9a94289d67eb60add484;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/auth/AuthManager.php b/includes/auth/AuthManager.php index d88a5b27e2..818f778301 100644 --- a/includes/auth/AuthManager.php +++ b/includes/auth/AuthManager.php @@ -24,6 +24,7 @@ namespace MediaWiki\Auth; use Config; +use MediaWiki\MediaWikiServices; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerInterface; use Status; @@ -146,7 +147,7 @@ class AuthManager implements LoggerAwareInterface { if ( self::$instance === null ) { self::$instance = new self( \RequestContext::getMain()->getRequest(), - \ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) + MediaWikiServices::getInstance()->getMainConfig() ); } return self::$instance; @@ -974,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. @@ -1578,7 +1579,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 @@ -1659,7 +1660,7 @@ class AuthManager implements LoggerAwareInterface { } } - $backoffKey = wfMemcKey( 'AuthManager', 'autocreate-failed', md5( $username ) ); + $backoffKey = $cache->makeKey( 'AuthManager', 'autocreate-failed', md5( $username ) ); if ( $cache->get( $backoffKey ) ) { $this->logger->debug( __METHOD__ . ': {username} denied by prior creation attempt failures', [ 'username' => $username,