r41272 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41271‎ | r41272 | r41273 >
Date:22:47, 25 September 2008
Author:brion
Status:old
Tags:
Comment:
Just for good measure, wrap code_rev and code_path inserts in a transaction. Otherwise it might be possible for an interrupted svnImport.php process to save a revision record but not its affected paths.
Modified paths:
  • /trunk/extensions/CodeReview/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeRevision.php
@@ -71,6 +71,8 @@
7272
7373 function save() {
7474 $dbw = wfGetDB( DB_MASTER );
 75+ $dbw->begin();
 76+
7577 $dbw->insert( 'code_rev',
7678 array(
7779 'cr_repo_id' => $this->mRepo,
@@ -96,6 +98,8 @@
9799 __METHOD__,
98100 array( 'IGNORE' ) );
99101 }
 102+
 103+ $dbw->commit();
100104 }
101105
102106 function getModifiedPaths(){

Status & tagging log