r93468 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93467‎ | r93468 | r93469 >
Date:16:44, 29 July 2011
Author:aaron
Status:ok
Tags:
Comment:
* Follow-up r93093: set the touch key for page moves too
* Tweaked related WikiPage.php comments
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/includes/WikiPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -3232,6 +3232,7 @@
32333233 if ( $u ) {
32343234 $u->doUpdate();
32353235 }
 3236+
32363237 # Update message cache for interface messages
32373238 if ( $this->getNamespace() == NS_MEDIAWIKI ) {
32383239 # @bug 17860: old article can be deleted, if this the case,
@@ -3324,10 +3325,11 @@
33253326 }
33263327 $nullRevId = $nullRevision->insertOn( $dbw );
33273328
 3329+ $now = wfTimestampNow();
33283330 # Change the name of the target page:
33293331 $dbw->update( 'page',
33303332 /* SET */ array(
3331 - 'page_touched' => $dbw->timestamp(),
 3333+ 'page_touched' => $dbw->timestamp( $now ),
33323334 'page_namespace' => $nt->getNamespace(),
33333335 'page_title' => $nt->getDBkey(),
33343336 'page_latest' => $nullRevId,
@@ -3339,6 +3341,7 @@
33403342
33413343 $article = new Article( $nt );
33423344 wfRunHooks( 'NewRevisionFromEditComplete', array( $article, $nullRevision, $latest, $wgUser ) );
 3345+ $article->setCachedLastEditTime( $now );
33433346
33443347 # Recreate the redirect, this time in the other direction.
33453348 if ( $createRedirect || !$wgUser->isAllowed( 'suppressredirect' ) ) {
Index: trunk/phase3/includes/WikiPage.php
@@ -846,7 +846,8 @@
847847 }
848848
849849 /**
850 - * Get the cached timestamp for the last time the page changed
 850+ * Get the cached timestamp for the last time the page changed.
 851+ * This is only used to help handle slave lag by comparing to page_touched.
851852 * @return string MW timestamp
852853 */
853854 protected function getCachedLastEditTime() {
@@ -856,7 +857,8 @@
857858 }
858859
859860 /**
860 - * Set the cached timestamp for the last time the page changed
 861+ * Set the cached timestamp for the last time the page changed.
 862+ * This is only used to help handle slave lag by comparing to page_touched.
861863 * @param $timestamp string
862864 * @return void
863865 */

Follow-up revisions

RevisionCommit summaryAuthorDate
r93473Fixed r93468, made setCachedLastEditTime() publicaaron17:56, 29 July 2011
r964701.17wmf1: MFT r92962, r93062, r93093, r93385, r93468, r93473, r94350, r94502,...catrope19:07, 7 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93093Follow-up r79518: added getCachedLastEditTime/getCachedLastEditTime methods t...aaron19:24, 25 July 2011

Status & tagging log