5 * @subpackage SpecialPage
11 * @subpackage SpecialPage
13 class UnusedCategoriesPage
extends QueryPage
{
16 return 'Unusedcategories';
19 function getPageHeader() {
20 return '<p>' . wfMsg('unusedcategoriestext') . '</p>';
25 $dbr =& wfGetDB( DB_SLAVE
);
26 extract( $dbr->tableNames( 'categorylinks','page' ));
27 return "SELECT 'Unusedcategories' as type,
28 {$NScat} as namespace, page_title as title, 1 as value
30 LEFT JOIN $categorylinks ON page_title=cl_to
32 AND page_namespace = {$NScat}
33 AND page_is_redirect = 0";
36 function formatResult( $skin, $result ) {
37 $title = Title
::makeTitle( NS_CATEGORY
, $result->title
);
38 return $skin->makeLinkObj( $title, $title->getText() );
43 function wfSpecialUnusedCategories() {
44 list( $limit, $offset ) = wfCheckLimits();
45 $uc = new UnusedCategoriesPage();
46 return $uc->doQuery( $offset, $limit );