X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FeraseArchivedFile.php;h=24ef1ed6f67634f39fb235bfaeca544d0b8bf8d9;hb=e3a869de07016defcf87ed014b6a6ddf986c6732;hp=d94d49b72b46dd5699033907887ea314d048e23d;hpb=716814a5d501efcc99b09fbb7e26caaf9a395d26;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/eraseArchivedFile.php b/maintenance/eraseArchivedFile.php index d94d49b72b..24ef1ed6f6 100644 --- a/maintenance/eraseArchivedFile.php +++ b/maintenance/eraseArchivedFile.php @@ -50,7 +50,7 @@ class EraseArchivedFile extends Maintenance { if ( $filekey === '*' ) { // all versions by name if ( !strlen( $filename ) ) { - $this->error( "Missing --filename parameter.", 1 ); + $this->fatalError( "Missing --filename parameter." ); } $afile = false; } else { // specified version @@ -60,7 +60,7 @@ class EraseArchivedFile extends Maintenance { [ 'fa_storage_group' => 'deleted', 'fa_storage_key' => $filekey ], __METHOD__, [], $fileQuery['joins'] ); if ( !$row ) { - $this->error( "No deleted file exists with key '$filekey'.", 1 ); + $this->fatalError( "No deleted file exists with key '$filekey'." ); } $filename = $row->fa_name; $afile = ArchivedFile::newFromRow( $row ); @@ -68,7 +68,7 @@ class EraseArchivedFile extends Maintenance { $file = wfLocalFile( $filename ); if ( $file->exists() ) { - $this->error( "File '$filename' is still a public file, use the delete form.\n", 1 ); + $this->fatalError( "File '$filename' is still a public file, use the delete form.\n" ); } $this->output( "Purging all thumbnails for file '$filename'..." );