Special page aliases for Finnish, plus various message changes.
[mediawiki.git] / includes / SpecialUnusedcategories.php
blob80f46a8798996c7dbd4b72d7a703986ec657c0a1
1 <?php
2 /**
4 * @package MediaWiki
5 * @subpackage SpecialPage
6 */
8 /**
10 * @package MediaWiki
11 * @subpackage SpecialPage
13 class UnusedCategoriesPage extends QueryPage {
15 function getName() {
16 return 'Unusedcategories';
19 function getPageHeader() {
20 return '<p>' . wfMsg('unusedcategoriestext') . '</p>';
23 function getSQL() {
24 $NScat = NS_CATEGORY;
25 $dbr =& wfGetDB( DB_SLAVE );
26 list( $categorylinks, $page ) = $dbr->tableNamesN( 'categorylinks', 'page' );
27 return "SELECT 'Unusedcategories' as type,
28 {$NScat} as namespace, page_title as title, page_title as value
29 FROM $page
30 LEFT JOIN $categorylinks ON page_title=cl_to
31 WHERE cl_from IS NULL
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() );
42 /** constructor */
43 function wfSpecialUnusedCategories() {
44 list( $limit, $offset ) = wfCheckLimits();
45 $uc = new UnusedCategoriesPage();
46 return $uc->doQuery( $offset, $limit );