(bug 1027) Fix page moves with table prefix
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 7 Dec 2004 07:58:36 +0000 (07:58 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 7 Dec 2004 07:58:36 +0000 (07:58 +0000)
includes/Title.php

index 43f8e78..3374c0d 100644 (file)
@@ -1359,7 +1359,8 @@ class Title {
                # 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=" . $dbw->addQuotes( $nt->getPrefixedText() ) .
+               $categorylinks = $dbw->tableName( 'categorylinks' );
+               $sql = "UPDATE $categorylinks SET cl_sortkey=" . $dbw->addQuotes( $nt->getPrefixedText() ) .
                        " WHERE cl_from=" . $dbw->addQuotes( $this->getArticleID() ) .
                        " AND cl_sortkey=" . $dbw->addQuotes( $this->getPrefixedText() );
                $dbw->query( $sql, 'SpecialMovepage::doSubmit' );