Add PasswordFactory to MediaWikiServices
[lhc/web/wiklou.git] / includes / user / BotPassword.php
index 960a486..2228feb 100644 (file)
@@ -250,8 +250,7 @@ class BotPassword implements IDBAccessObject {
                        return PasswordFactory::newInvalidPassword();
                }
 
-               $passwordFactory = new \PasswordFactory();
-               $passwordFactory->init( \RequestContext::getMain()->getConfig() );
+               $passwordFactory = MediaWikiServices::getInstance()->getPasswordFactory();
                try {
                        return $passwordFactory->newFromCiphertext( $password );
                } catch ( PasswordError $ex ) {