r4545 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r4544‎ | r4545 | r4546 >
Date:19:34, 6 August 2004
Author:vibber
Status:old
Tags:
Comment:
Fix bug 975072 (Move page doesn't update categories page)
Backported from head.
Modified paths:
  • /branches/REL1_3/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: branches/REL1_3/phase3/includes/Title.php
@@ -881,7 +881,16 @@
882882 } else { # Target didn't exist, do normal move.
883883 $this->moveToNewTitle( $nt, $newid );
884884 }
 885+
 886+ # Fixing category links (those without piped 'alternate' names) to be sorted under the new title
 887+
 888+ $dbw =& wfGetDB( DB_MASTER );
 889+ $sql = "UPDATE categorylinks SET cl_sortkey='" . wfStrencode( $nt->getPrefixedText() ) . "'" .
 890+ " WHERE cl_from='" . wfStrencode( $this->getArticleID() ) . "'" .
 891+ " AND cl_sortkey='" . wfStrencode( $this->getPrefixedText() ) . "'";
 892+ $dbw->query( $sql, "SpecialMovepage::doSubmit" );
885893
 894+
886895 # Update watchlists
887896
888897 $oldnamespace = $this->getNamespace() & ~1;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r4539This should fix bug 975072 (Move page doesn't update categories page)magnus_manske16:09, 6 August 2004
r4540This should fix bug 975072 (Move page doesn't update categories page)magnus_manske16:25, 6 August 2004

Status & tagging log