From: Adam Roses Wight Date: Wed, 21 May 2014 08:01:36 +0000 (-0700) Subject: Correct a comment about updateRevisionOn X-Git-Tag: 1.31.0-rc.0~15596 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=5705b0aed9ebae10e0160db44d77eeb7cc75fc09;p=lhc%2Fweb%2Fwiklou.git Correct a comment about updateRevisionOn to reflect its compare-and-swap semantics. Change-Id: I6a68e673195e0b6688f6fbc9199a8355b20c0da0 --- diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 5722af2cb7..8fe948b31b 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -1838,11 +1838,7 @@ class WikiPage implements Page, IDBAccessObject { // Update page // - // Note that we use $this->mLatest instead of fetching a value from the master DB - // during the course of this function. This makes sure that EditPage can detect - // edit conflicts reliably, either by $ok here, or by $article->getTimestamp() - // before this function is called. A previous function used a separate query, this - // creates a window where concurrent edits can cause an ignored edit conflict. + // We check for conflicts by comparing $oldid with the current latest revision ID. $ok = $this->updateRevisionOn( $dbw, $revision, $oldid, $oldIsRedirect ); if ( !$ok ) {