http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72200
Revision: 72200
Author: reedy
Date: 2010-09-02 16:03:59 +0000 (Thu, 02 Sep 2010)
Log Message:
-----------
Followup r72181, condense code, use selectRow()
Modified Paths:
--------------
trunk/phase3/includes/Title.php
Modified: trunk/phase3/includes/Title.php
===================================================================
--- trunk/phase3/includes/Title.php 2010-09-02 15:48:43 UTC (rev 72199)
+++ trunk/phase3/includes/Title.php 2010-09-02 16:03:59 UTC (rev 72200)
@@ -3539,20 +3539,13 @@
*/
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 );
}
/**
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs