http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97551
Revision: 97551
Author: reedy
Date: 2011-09-19 20:20:41 +0000 (Mon, 19 Sep 2011)
Log Message:
-----------
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)
Modified Paths:
--------------
trunk/phase3/maintenance/deleteBatch.php
Modified: trunk/phase3/maintenance/deleteBatch.php
===================================================================
--- trunk/phase3/maintenance/deleteBatch.php 2011-09-19 20:09:43 UTC (rev
97550)
+++ trunk/phase3/maintenance/deleteBatch.php 2011-09-19 20:20:41 UTC (rev
97551)
@@ -86,8 +86,10 @@
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 @@
$success = $art->doDeleteArticle( $reason );
$dbw->commit();
if ( $success ) {
- $this->output( "\n" );
+ $this->output( " Deleted!\n" );
} else {
$this->output( " FAILED to delete article\n" );
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs