From 10f8f3c6122815a11a993b10d2d8ee9c2a259424 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Sat, 4 Jan 2014 18:41:10 -0500 Subject: [PATCH] Properly peform deletion updates when moving over a redirect When moving over a redirect, WikiPage::doDeleteUpdates is called to do things like clean up obsolete entries in `redirect` and other tables. But it doesn't pass a Content object and the WikiPage doesn't have one cached, so it winds up not actually doing these updates. Change-Id: I54c90cebfd6bea07137a77bd70acec02cab51084 --- includes/Title.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Title.php b/includes/Title.php index 88268bb746..d3005136d7 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3891,6 +3891,7 @@ class Title { if ( $moveOverRedirect ) { $newid = $nt->getArticleID(); + $newcontent = $newpage->getContent(); # Delete the old redirect. We don't save it to history since # by definition if we've got here it's rather uninteresting. @@ -3898,7 +3899,7 @@ class Title { # a conflict on the unique namespace+title index... $dbw->delete( 'page', array( 'page_id' => $newid ), __METHOD__ ); - $newpage->doDeleteUpdates( $newid ); + $newpage->doDeleteUpdates( $newid, $newcontent ); } # Save a null revision in the page's history notifying of the move -- 2.20.1