Index: branches/REL1_3/phase3/includes/Title.php |
— | — | @@ -881,7 +881,16 @@ |
882 | 882 | } else { # Target didn't exist, do normal move. |
883 | 883 | $this->moveToNewTitle( $nt, $newid ); |
884 | 884 | } |
| 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" ); |
885 | 893 | |
| 894 | + |
886 | 895 | # Update watchlists |
887 | 896 | |
888 | 897 | $oldnamespace = $this->getNamespace() & ~1; |