From b9d3881e2ca8698dc688422334d7fc7c34d06b7b Mon Sep 17 00:00:00 2001 From: Magnus Manske Date: Fri, 6 Aug 2004 16:25:27 +0000 Subject: [PATCH] This should fix bug 975072 (Move page doesn't update categories page) --- includes/Title.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/Title.php b/includes/Title.php index 03bcf97aee..b224ad0a6f 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -898,6 +898,14 @@ class Title { $this->moveToNewTitle( $nt, $newid ); } + + # Fixing category links (those without piped 'alternate' names) to be sorted under the new title + + $dbw =& wfGetDB( DB_MASTER ); + $sql = "UPDATE categorylinks SET cl_sortkey=\"" . $nt->getPrefixedText() . "\" WHERE cl_from=\"" .$this->getArticleID() . "\" AND cl_sortkey=\"" . $this->getPrefixedText() . "\"" ; + $dbw->query( $sql, "SpecialMovepage::doSubmit" ); + + # Update watchlists $oldnamespace = $this->getNamespace() & ~1; -- 2.20.1