X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fundelete.php;h=e9b2abd0f91b9e509c1c55db5c1b14277337c1e1;hb=74d04edec385aa86ee01943b9a27475d79f74e78;hp=861f5ed06cd480427398712d20e9fcc2343b50d8;hpb=74174fca253b9a759d7402f09b7fc37d5de0e9be;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/undelete.php b/maintenance/undelete.php index 861f5ed06c..e9b2abd0f9 100644 --- a/maintenance/undelete.php +++ b/maintenance/undelete.php @@ -41,22 +41,22 @@ 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" ); } } -$maintClass = "Undelete"; +$maintClass = Undelete::class; require_once RUN_MAINTENANCE_IF_MAIN;