X-Git-Url: http://git.cyclocoop.org/%27.%28%24current%20%3E%202?a=blobdiff_plain;f=maintenance%2FwrapOldPasswords.php;h=1fc0f37ad8707b0177a121811112a544fa44a22f;hb=23bf104160b9b5d7a9423d1c7939cb9f374effea;hp=981143ecf782b88f7dac6c0e7e8d672d5cdb42c8;hpb=9b83841b9b44457b498770b847ac72f53031c34d;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/wrapOldPasswords.php b/maintenance/wrapOldPasswords.php index 981143ecf7..1fc0f37ad8 100644 --- a/maintenance/wrapOldPasswords.php +++ b/maintenance/wrapOldPasswords.php @@ -43,12 +43,6 @@ class WrapOldPasswords extends Maintenance { } public function execute() { - global $wgAuth; - - if ( !$wgAuth->allowSetLocalPassword() ) { - $this->error( '$wgAuth does not allow local passwords. Aborting.', true ); - } - $passwordFactory = new PasswordFactory(); $passwordFactory->init( RequestContext::getMain()->getConfig() ); @@ -57,12 +51,12 @@ class WrapOldPasswords extends Maintenance { // 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 @@ -127,5 +121,5 @@ class WrapOldPasswords extends Maintenance { } } -$maintClass = "WrapOldPasswords"; +$maintClass = WrapOldPasswords::class; require_once RUN_MAINTENANCE_IF_MAIN;