Index: trunk/extensions/Collection/Collection.hooks.php |
— | — | @@ -370,15 +370,15 @@ |
371 | 371 | |
372 | 372 | static protected function pageInCategory( $pageId, $categoryName ) { |
373 | 373 | $dbr = wfGetDB( DB_SLAVE ); |
374 | | - $count = $dbr->selectField( |
| 374 | + $exists = $dbr->selectField( |
375 | 375 | 'categorylinks', |
376 | | - 'COUNT(*)', |
| 376 | + '1', |
377 | 377 | array( |
378 | 378 | 'cl_from' => $pageId, |
379 | 379 | 'cl_to' => $categoryName |
380 | 380 | ), |
381 | 381 | __METHOD__ |
382 | 382 | ); |
383 | | - return ( $count > 0 ); |
| 383 | + return (bool)$exists; |
384 | 384 | } |
385 | 385 | } |