continue;
}
-
$this->output( $page->getPrefixedText() );
$dbw->begin();
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->isLocal()
+ || !$img->delete( $reason ) ) {
+ $this->output( " FAILED to delete image file... " );
}
} else {
$art = new Article( $page );
$success = $art->doDeleteArticle( $reason );
$dbw->commit();
if ( $success ) {
- $this->output( "\n" );
+ $this->output( " Deleted!\n" );
} else {
$this->output( " FAILED to delete article\n" );
}
sleep( $interval );
}
wfWaitForSlaves();
-}
+ }
}
}