X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fundelete.php;h=278b68d377173ccaa4f0bd8513e13b16a7b879c8;hb=99d73dc9033603b03198f84854e9a5078bde89b8;hp=861f5ed06cd480427398712d20e9fcc2343b50d8;hpb=920c06e42c307fcaea47d9b65e09303aded2d1c9;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/undelete.php b/maintenance/undelete.php index 861f5ed06c..278b68d377 100644 --- a/maintenance/undelete.php +++ b/maintenance/undelete.php @@ -41,19 +41,19 @@ class Undelete extends Maintenance { $title = Title::newFromText( $pageName ); if ( !$title ) { - $this->error( "Invalid title", true ); + $this->fatalError( "Invalid title" ); } if ( $user === false ) { - $wgUser = User::newSystemUser( 'Command line script', array( 'steal' => true ) ); + $wgUser = User::newSystemUser( 'Command line script', [ 'steal' => true ] ); } else { $wgUser = User::newFromName( $user ); } if ( !$wgUser ) { - $this->error( "Invalid username", true ); + $this->fatalError( "Invalid username" ); } $archive = new PageArchive( $title, RequestContext::getMain()->getConfig() ); $this->output( "Undeleting " . $title->getPrefixedDBkey() . '...' ); - $archive->undelete( array(), $reason ); + $archive->undelete( [], $reason ); $this->output( "done\n" ); } }