X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdeleteBatch.php;h=e6321e1ffb31c53bce5d7ced07985c47f97273b0;hb=d891ffecbde6b258d2928ddf1921456da946a203;hp=a7513967348da5860647430cc6840a73b5fc929d;hpb=280cb03b4d87e864a723686daf5d1699b3566ec1;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php index a751396734..e6321e1ffb 100644 --- a/maintenance/deleteBatch.php +++ b/maintenance/deleteBatch.php @@ -97,17 +97,15 @@ class DeleteBatch extends Maintenance { } $this->output( $title->getPrefixedText() ); - $dbw->begin( __METHOD__ ); if ( $title->getNamespace() == NS_FILE ) { - $img = wfFindFile( $title ); + $img = wfFindFile( $title, array( 'ignoreRedirect' => true ) ); if ( $img && $img->isLocal() && !$img->delete( $reason ) ) { $this->output( " FAILED to delete associated file... " ); } } $page = WikiPage::factory( $title ); $error = ''; - $success = $page->doDeleteArticle( $reason, false, 0, false, $error, $user ); - $dbw->commit( __METHOD__ ); + $success = $page->doDeleteArticle( $reason, false, 0, true, $error, $user ); if ( $success ) { $this->output( " Deleted!\n" ); } else {