X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fedit.php;h=60ed2523ef0cf01b9a2e7cf816af24f60e98af19;hb=801a8bdaa38cea5ff4db0440c82e9eb83e083772;hp=4219ed05179b391cce6d4d9376f532704130d7e7;hpb=57eaa2bf04ce1b48bd89c10defe4de5b7d31f047;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/edit.php b/maintenance/edit.php index 4219ed0517..60ed2523ef 100644 --- a/maintenance/edit.php +++ b/maintenance/edit.php @@ -59,7 +59,7 @@ class EditCLI extends Maintenance { $wgUser = User::newFromName( $userName ); } if ( !$wgUser ) { - $this->error( "Invalid username", true ); + $this->fatalError( "Invalid username" ); } if ( $wgUser->isAnon() ) { $wgUser->addToDatabase(); @@ -67,13 +67,13 @@ class EditCLI extends Maintenance { $title = Title::newFromText( $this->getArg() ); if ( !$title ) { - $this->error( "Invalid title", true ); + $this->fatalError( "Invalid title" ); } if ( $this->hasOption( 'nocreate' ) && !$title->exists() ) { - $this->error( "Page does not exist", true ); + $this->fatalError( "Page does not exist" ); } elseif ( $this->hasOption( 'createonly' ) && $title->exists() ) { - $this->error( "Page already exists", true ); + $this->fatalError( "Page already exists" ); } $page = WikiPage::factory( $title ); @@ -103,5 +103,5 @@ class EditCLI extends Maintenance { } } -$maintClass = "EditCLI"; +$maintClass = EditCLI::class; require_once RUN_MAINTENANCE_IF_MAIN;