From: Sam Reed Date: Thu, 2 Sep 2010 16:03:59 +0000 (+0000) Subject: Followup r72181, condense code, use selectRow() X-Git-Tag: 1.31.0-rc.0~35227 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=6e497d00d271a3ddb58875c8f3f036972272b5da;p=lhc%2Fweb%2Fwiklou.git Followup r72181, condense code, use selectRow() --- diff --git a/includes/Title.php b/includes/Title.php index e3e0eb72a6..d741726ece 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3539,20 +3539,13 @@ class Title { */ public function isInCategory( $category ) { $dbr = wfGetDB( DB_SLAVE ); - $res = $dbr->select( - 'categorylinks', - '*', + return $dbr->selectRow( 'categorylinks', '*', array( 'cl_from' => $this->getArticleId(), 'cl_to' => $category, ), - __METHOD__, - array( - 'LIMIT' => 1 - ) + __METHOD__ ); - - return ( $dbr->numRows( $res ) > 0 ); } /**