From: Aaron Schulz Date: Sun, 26 Apr 2015 17:19:19 +0000 (-0700) Subject: Fixed transaction error while undeleting revdeleted files X-Git-Tag: 1.31.0-rc.0~11578^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=f58facad1c4e9413b6361b77db321490eebf69ab;p=lhc%2Fweb%2Fwiklou.git Fixed transaction error while undeleting revdeleted files Bug: T97222 Change-Id: I16cdf228a517e93ac71ccda243b9e47b68ad7717 --- diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php index 926fd0b8a8..e7e4c750ef 100644 --- a/includes/filerepo/LocalRepo.php +++ b/includes/filerepo/LocalRepo.php @@ -90,7 +90,7 @@ class LocalRepo extends FileRepo { foreach ( $storageKeys as $key ) { $hashPath = $this->getDeletedHashPath( $key ); $path = "$root/$hashPath$key"; - $dbw->begin( __METHOD__ ); + $dbw->startAtomic( __METHOD__ ); // Check for usage in deleted/hidden files and preemptively // lock the key to avoid any future use until we are finished. $deleted = $this->deletedFileHasKey( $key, 'lock' ); @@ -106,7 +106,7 @@ class LocalRepo extends FileRepo { wfDebug( __METHOD__ . ": $key still in use\n" ); $status->successCount++; } - $dbw->commit( __METHOD__ ); + $dbw->endAtomic( __METHOD__ ); } return $status;