From 1b43d4ee09ca2fa413e61b196bf6995e9b1b346d Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 27 Mar 2005 22:29:37 +0000 Subject: [PATCH] Fix query syntax which broke a couple functions' debug info (foreport from 1.4) --- includes/ImagePage.php | 2 +- includes/SpecialRecentchanges.php | 2 +- includes/Title.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index adf3488743..a51f3b5ffb 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -184,7 +184,7 @@ class ImagePage extends Article { $sql = "SELECT page_namespace,page_title FROM $imagelinks,$page WHERE il_to=" . $dbr->addQuotes( $this->mTitle->getDBkey() ) . " AND il_from=page_id" . " LIMIT 500"; # quickie emergency brake - $res = $dbr->query( $sql, DB_SLAVE, "Article::imageLinks" ); + $res = $dbr->query( $sql, "ImagePage::imageLinks" ); if ( 0 == $dbr->numRows( $res ) ) { $wgOut->addHtml( '

' . wfMsg( "nolinkstoimage" ) . "

\n" ); diff --git a/includes/SpecialRecentchanges.php b/includes/SpecialRecentchanges.php index a4070c7f62..200d977b3a 100644 --- a/includes/SpecialRecentchanges.php +++ b/includes/SpecialRecentchanges.php @@ -124,7 +124,7 @@ function wfSpecialRecentchanges( $par ) { "WHERE rc_timestamp > '{$cutoff}' {$hidem} " . "ORDER BY rc_timestamp DESC LIMIT {$limit}"; - $res = $dbr->query( $sql2, DB_SLAVE, $fname ); + $res = $dbr->query( $sql2, $fname ); $rows = array(); while( $row = $dbr->fetchObject( $res ) ){ $rows[] = $row; diff --git a/includes/Title.php b/includes/Title.php index 63390a1ce2..4fb3dc27e5 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1571,7 +1571,7 @@ class Title { $sql .= "($id, $oldid)"; } - $dbw->query( $sql, DB_MASTER, $fname ); + $dbw->query( $sql, $fname ); } # Now, we record the link from the redirect to the new title. -- 2.20.1