Index: trunk/phase3/includes/Title.php |
— | — | @@ -2812,6 +2812,9 @@ |
2813 | 2813 | $newid = $nt->getArticleID(); |
2814 | 2814 | $oldid = $this->getArticleID(); |
2815 | 2815 | $latest = $this->getLatestRevID(); |
| 2816 | + $rcts = $dbw->timestamp( $nt->getEarliestRevTime() ); |
| 2817 | + $newns = $nt->getNamespace(); |
| 2818 | + $newdbk = $nt->getDBkey(); |
2816 | 2819 | |
2817 | 2820 | $dbw = wfGetDB( DB_MASTER ); |
2818 | 2821 | |
— | — | @@ -2833,6 +2836,11 @@ |
2834 | 2837 | $dbw->delete( 'langlinks', array( 'll_from' => $newid ), __METHOD__ ); |
2835 | 2838 | $dbw->delete( 'redirect', array( 'rd_from' => $newid ), __METHOD__ ); |
2836 | 2839 | } |
| 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 | + ); |
2837 | 2845 | |
2838 | 2846 | # Save a null revision in the page's history notifying of the move |
2839 | 2847 | $nullRevision = Revision::newNullRevision( $dbw, $oldid, $comment, true ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -312,6 +312,8 @@ |
313 | 313 | "enhanced recent changes" |
314 | 314 | * (bug 19857) maintenance/deleteRevision.php on last revision no longer breaks |
315 | 315 | target page |
| 316 | +* (bug 16877) Moving a page over a redirect no longer leaves an orphan entry in |
| 317 | + the recentchanges table |
316 | 318 | |
317 | 319 | == API changes in 1.16 == |
318 | 320 | |