From 00755349b46b16306a785c8e26dcc71d17fbe320 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 19 Sep 2011 20:20:41 +0000 Subject: [PATCH] Don't try and delete ForeignAPIFile or ForeignDBFile Add a space before the error message so it's not cramped up next to the page name Add a success error message (explicit is better than guessing) --- maintenance/deleteBatch.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php index 52542ce3ed..91524f667d 100644 --- a/maintenance/deleteBatch.php +++ b/maintenance/deleteBatch.php @@ -86,8 +86,10 @@ class DeleteBatch extends Maintenance { if ( $page->getNamespace() == NS_FILE ) { $art = new ImagePage( $page ); $img = wfFindFile( $art->mTitle ); - if ( !$img || !$img->delete( $reason ) ) { - $this->output( "FAILED to delete image file... " ); + if ( !$img + || $img instanceof ForeignDBFile || $img instanceof ForeignAPIFile + || !$img->delete( $reason ) ) { + $this->output( " FAILED to delete image file... " ); } } else { $art = new Article( $page ); @@ -95,7 +97,7 @@ class DeleteBatch extends Maintenance { $success = $art->doDeleteArticle( $reason ); $dbw->commit(); if ( $success ) { - $this->output( "\n" ); + $this->output( " Deleted!\n" ); } else { $this->output( " FAILED to delete article\n" ); } -- 2.20.1