r53659 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53658‎ | r53659 | r53660 >
Date:20:09, 22 July 2009
Author:mrzman
Status:resolved
Tags:
Comment:
(bug 16877) When moving a page over a redirect, delete the creation entry for the redirect from the recentchanges table
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -2812,6 +2812,9 @@
28132813 $newid = $nt->getArticleID();
28142814 $oldid = $this->getArticleID();
28152815 $latest = $this->getLatestRevID();
 2816+ $rcts = $dbw->timestamp( $nt->getEarliestRevTime() );
 2817+ $newns = $nt->getNamespace();
 2818+ $newdbk = $nt->getDBkey();
28162819
28172820 $dbw = wfGetDB( DB_MASTER );
28182821
@@ -2833,6 +2836,11 @@
28342837 $dbw->delete( 'langlinks', array( 'll_from' => $newid ), __METHOD__ );
28352838 $dbw->delete( 'redirect', array( 'rd_from' => $newid ), __METHOD__ );
28362839 }
 2840+ // If the redirect was recently created, it may have an entry in recentchanges still
 2841+ $dbw->delete( 'recentchanges',
 2842+ array( 'rc_timestamp' => $rcts, 'rc_namespace' => $newns, 'rc_title' => $newdbk, 'rc_new' => 1 ),
 2843+ __METHOD__
 2844+ );
28372845
28382846 # Save a null revision in the page's history notifying of the move
28392847 $nullRevision = Revision::newNullRevision( $dbw, $oldid, $comment, true );
Index: trunk/phase3/RELEASE-NOTES
@@ -312,6 +312,8 @@
313313 "enhanced recent changes"
314314 * (bug 19857) maintenance/deleteRevision.php on last revision no longer breaks
315315 target page
 316+* (bug 16877) Moving a page over a redirect no longer leaves an orphan entry in
 317+ the recentchanges table
316318
317319 == API changes in 1.16 ==
318320

Follow-up revisions

RevisionCommit summaryAuthorDate
r55230Fix fatal on every move over redirect, from r53659...simetrical10:43, 18 August 2009

Status & tagging log