From: Aaron Schulz Date: Sat, 3 Oct 2015 01:04:45 +0000 (-0700) Subject: Remove mismatched COMMIT from FileDeleteForm X-Git-Tag: 1.31.0-rc.0~9530^2~1 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=985a8f721459ebea1dc5a0daa178295eec8cf444;p=lhc%2Fweb%2Fwiklou.git Remove mismatched COMMIT from FileDeleteForm * Rely on the main DBO_TRX to commit at request end Change-Id: Iad545db3603335baddc4156128f1dd756dbe99b4 --- diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index bcd6db2026..ae186bc950 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -195,9 +195,7 @@ class FileDeleteForm { // or revision is missing, so check for isOK() rather than isGood() if ( $deleteStatus->isOK() ) { $status = $file->delete( $reason, $suppress, $user ); - if ( $status->isOK() ) { - $dbw->commit( __METHOD__ ); - } else { + if ( !$status->isOK() ) { $dbw->rollback( __METHOD__ ); } }