Merge "Rewrite pref cleanup script"
[lhc/web/wiklou.git] / maintenance / validateRegistrationFile.php
index aa1f668..4b07796 100644 (file)
@@ -9,7 +9,7 @@ class ValidateRegistrationFile extends Maintenance {
        }
        public function execute() {
                $validator = new ExtensionJsonValidator( function ( $msg ) {
-                       $this->error( $msg, 1 );
+                       $this->fatalError( $msg );
                } );
                $validator->checkDependencies();
                $path = $this->getArg( 0 );
@@ -17,10 +17,10 @@ class ValidateRegistrationFile extends Maintenance {
                        $validator->validate( $path );
                        $this->output( "$path validates against the schema!\n" );
                } catch ( ExtensionJsonValidationError $e ) {
-                       $this->error( $e->getMessage(), 1 );
+                       $this->fatalError( $e->getMessage() );
                }
        }
 }
 
-$maintClass = 'ValidateRegistrationFile';
+$maintClass = ValidateRegistrationFile::class;
 require_once RUN_MAINTENANCE_IF_MAIN;