From: Chad Horohoe Date: Wed, 18 Feb 2009 19:37:23 +0000 (+0000) Subject: Just do a selectRow(). We're only returning 1 row anyway. X-Git-Tag: 1.31.0-rc.0~42801 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=0f1930dc099b0f699854964a03d0eaa0784b387c;p=lhc%2Fweb%2Fwiklou.git Just do a selectRow(). We're only returning 1 row anyway. --- diff --git a/includes/Article.php b/includes/Article.php index eeaca044eb..2a9f66dd3e 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -84,12 +84,12 @@ class Article { return $this->mRedirectTarget; # Query the redirect table $dbr = wfGetDB( DB_SLAVE ); - $res = $dbr->select( 'redirect', + $row = $dbr->selectRow( 'redirect', array('rd_namespace', 'rd_title'), - array('rd_from' => $this->getID()), + array('rd_from' => $this->getID() ), __METHOD__ ); - if( $row = $dbr->fetchObject($res) ) { + if( $row ) { return $this->mRedirectTarget = Title::makeTitle($row->rd_namespace, $row->rd_title); } # This page doesn't have an entry in the redirect table