X-Git-Url: https://git.cyclocoop.org/admin/?a=blobdiff_plain;f=maintenance%2FwrapOldPasswords.php;h=ef9e46ed3ae5ada9286dc090f4750fac6ff69fd6;hb=1427bb1821e7f2e5dfbf68d929f369e4344ad884;hp=6a601ad8b5a8646d496c53d2e09ef6a6f2dd16e1;hpb=2f15b22b91c0426b06e9ece9ffd2aa14fbdaa621;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/wrapOldPasswords.php b/maintenance/wrapOldPasswords.php index 6a601ad8b5..ef9e46ed3a 100644 --- a/maintenance/wrapOldPasswords.php +++ b/maintenance/wrapOldPasswords.php @@ -1,7 +1,4 @@ init( RequestContext::getMain()->getConfig() ); + $passwordFactory = MediaWikiServices::getInstance()->getPasswordFactory(); $typeInfo = $passwordFactory->getTypes(); $layeredType = $this->getOption( 'type' ); // Check that type exists and is a layered type if ( !isset( $typeInfo[$layeredType] ) ) { - $this->error( 'Undefined password type', true ); + $this->fatalError( 'Undefined password type' ); } $passObj = $passwordFactory->newFromType( $layeredType ); if ( !$passObj instanceof LayeredParameterizedPassword ) { - $this->error( 'Layered parameterized password type must be used.', true ); + $this->fatalError( 'Layered parameterized password type must be used.' ); } // Extract the first layer type @@ -121,5 +120,5 @@ class WrapOldPasswords extends Maintenance { } } -$maintClass = "WrapOldPasswords"; +$maintClass = WrapOldPasswords::class; require_once RUN_MAINTENANCE_IF_MAIN;