Fix query syntax which broke a couple functions' debug info (foreport from 1.4)
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 27 Mar 2005 22:29:37 +0000 (22:29 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 27 Mar 2005 22:29:37 +0000 (22:29 +0000)
includes/ImagePage.php
includes/SpecialRecentchanges.php
includes/Title.php

index adf3488..a51f3b5 100644 (file)
@@ -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( '<p>' . wfMsg( "nolinkstoimage" ) . "</p>\n" );
index a4070c7..200d977 100644 (file)
@@ -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;
index 63390a1..4fb3dc2 100644 (file)
@@ -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.