registration: Improve duplicate config setting exception
[lhc/web/wiklou.git] / maintenance / wrapOldPasswords.php
index 981143e..1fc0f37 100644 (file)
@@ -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;