From: Aaron Schulz Date: Thu, 30 Jan 2014 22:13:08 +0000 (-0800) Subject: Made LinksUpdate::updateLinksTimestamp() use a more correct timestamp X-Git-Tag: 1.31.0-rc.0~17065^2 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=9bb646555385218aab006af3629a5483f8cbae1f;p=lhc%2Fweb%2Fwiklou.git Made LinksUpdate::updateLinksTimestamp() use a more correct timestamp * This can matter if page Y uses templates A and B, someone edits A, someone edits Y, someone edits B, an A-refreshLinks job on Y runs (using cache), then a B-refreshLinks job runs on Y. Previously, the later job could incorrectly no-op itself due to the high page_links_updated value on Y. Change-Id: I984d2d1fc5aa075f3e3ead4921deaffbdc20e963 --- diff --git a/includes/deferred/LinksUpdate.php b/includes/deferred/LinksUpdate.php index 8c3b671195..01555ffac4 100644 --- a/includes/deferred/LinksUpdate.php +++ b/includes/deferred/LinksUpdate.php @@ -869,8 +869,10 @@ class LinksUpdate extends SqlDataUpdate { */ protected function updateLinksTimestamp() { if ( $this->mId ) { + // The link updates made here only reflect the freshness of the parser output + $timestamp = $this->mParserOutput->getCacheTime(); $this->mDb->update( 'page', - array( 'page_links_updated' => $this->mDb->timestamp() ), + array( 'page_links_updated' => $this->mDb->timestamp( $timestamp ) ), array( 'page_id' => $this->mId ), __METHOD__ );