10 class UnusedCategoriesPage
extends QueryPage
{
12 function isExpensive() { return true; }
15 return 'Unusedcategories';
18 function getPageHeader() {
19 return wfMsgExt( 'unusedcategoriestext', array( 'parse' ) );
24 $dbr = wfGetDB( DB_SLAVE
);
25 list( $categorylinks, $page ) = $dbr->tableNamesN( 'categorylinks', 'page' );
26 return "SELECT 'Unusedcategories' as type,
27 {$NScat} as namespace, page_title as title, page_title as value
29 LEFT JOIN $categorylinks ON page_title=cl_to
31 AND page_namespace = {$NScat}
32 AND page_is_redirect = 0";
35 function formatResult( $skin, $result ) {
36 $title = Title
::makeTitle( NS_CATEGORY
, $result->title
);
37 return $skin->link( $title, $title->getText() );
42 function wfSpecialUnusedCategories() {
43 list( $limit, $offset ) = wfCheckLimits();
44 $uc = new UnusedCategoriesPage();
45 return $uc->doQuery( $offset, $limit );