Index: trunk/extensions/Collection/Collection.hooks.php |
— | — | @@ -357,4 +357,13 @@ |
358 | 358 | } |
359 | 359 | } |
360 | 360 | |
| 361 | + static protected function pageInCategory( $pageId, $categoryName ) { |
| 362 | + $dbr = wfGetDB( DB_SLAVE ); |
| 363 | + $count = $dbr->selectField( 'categorylinks', 'COUNT(*)', |
| 364 | + array( |
| 365 | + 'cl_from' => $pageId, |
| 366 | + 'cl_to' => $categoryName ), |
| 367 | + __METHOD__ ); |
| 368 | + return ($count > 0); |
| 369 | + } |
361 | 370 | } |
Index: trunk/extensions/Collection/Collection.body.php |
— | — | @@ -906,16 +906,6 @@ |
907 | 907 | $wgOut->addTemplate( $template ); |
908 | 908 | } |
909 | 909 | |
910 | | - static protected function pageInCategory( $pageId, $categoryName ) { |
911 | | - $dbr = wfGetDB( DB_SLAVE ); |
912 | | - $count = $dbr->selectField( 'categorylinks', 'COUNT(*)', |
913 | | - array( |
914 | | - 'cl_from' => $pageId, |
915 | | - 'cl_to' => $categoryName ), |
916 | | - __METHOD__ ); |
917 | | - return ($count > 0); |
918 | | - } |
919 | | - |
920 | 910 | static function mwServeCommand( $command, $args, $timeout=true, $toFile=null ) { |
921 | 911 | global $wgOut; |
922 | 912 | global $wgCollectionMWServeURL; |