X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fspecials%2FSpecialBotPasswords.php;h=2d62d8feeabbe434a465c0f50abb1471bdb1ef33;hb=3857d06f1cb97d6833c348a0dff2731e629bd802;hp=f03565adef243b9d1e321d586c155f42838fc688;hpb=c8c2d83312229284c552ad19baeacc588c63145d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialBotPasswords.php b/includes/specials/SpecialBotPasswords.php index f03565adef..2d62d8feea 100644 --- a/includes/specials/SpecialBotPasswords.php +++ b/includes/specials/SpecialBotPasswords.php @@ -22,6 +22,7 @@ */ use MediaWiki\Logger\LoggerFactory; +use MediaWiki\MediaWikiServices; /** * Let users manage bot passwords @@ -57,6 +58,10 @@ class SpecialBotPasswords extends FormSpecialPage { return $this->getConfig()->get( 'EnableBotPasswords' ); } + protected function getLoginSecurityLevel() { + return $this->getName(); + } + /** * Main execution point * @param string|null $par @@ -162,8 +167,7 @@ class SpecialBotPasswords extends FormSpecialPage { } else { $linkRenderer = $this->getLinkRenderer(); - $passwordFactory = new PasswordFactory(); - $passwordFactory->init( $this->getConfig() ); + $passwordFactory = MediaWikiServices::getInstance()->getPasswordFactory(); $dbr = BotPassword::getDB( DB_REPLICA ); $res = $dbr->select( @@ -317,8 +321,7 @@ class SpecialBotPasswords extends FormSpecialPage { if ( $this->operation === 'insert' || !empty( $data['resetPassword'] ) ) { $this->password = BotPassword::generatePassword( $this->getConfig() ); - $passwordFactory = new PasswordFactory(); - $passwordFactory->init( RequestContext::getMain()->getConfig() ); + $passwordFactory = MediaWikiServices::getInstance()->getPasswordFactory(); $password = $passwordFactory->newFromPlaintext( $this->password ); } else { $password = null;