From 6e497d00d271a3ddb58875c8f3f036972272b5da Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 2 Sep 2010 16:03:59 +0000 Subject: [PATCH] Followup r72181, condense code, use selectRow() --- includes/Title.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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 ); } /** -- 2.20.1