Index: includes/parser/Parser.php =================================================================== --- includes/parser/Parser.php (revision 46189) +++ includes/parser/Parser.php (working copy) @@ -3439,6 +3439,9 @@ wfDebug( __METHOD__.": [[MediaWiki:hidden-category-category]] is not a valid title!\n" ); } } + if ( isset( $this->mDoubleUnderscores['ignoreunused'] ) && $this->mTitle->getNamespace() == NS_CATEGORY ) { + $this->mOutput->setProperty( 'ignoreunused', 'y' ); + } # (bug 8068) Allow control over whether robots index a page. # # FIXME (bug 14899): __INDEX__ always overrides __NOINDEX__ here! This Index: includes/MagicWord.php =================================================================== --- includes/MagicWord.php (revision 46189) +++ includes/MagicWord.php (working copy) @@ -159,6 +159,7 @@ 'noeditsection', 'newsectionlink', 'hiddencat', + 'ignoreunused', 'index', 'noindex', 'staticredirect', Index: includes/specials/SpecialUnusedcategories.php =================================================================== --- includes/specials/SpecialUnusedcategories.php (revision 46189) +++ includes/specials/SpecialUnusedcategories.php (working copy) @@ -22,14 +22,16 @@ function getSQL() { $NScat = NS_CATEGORY; $dbr = wfGetDB( DB_SLAVE ); - list( $categorylinks, $page ) = $dbr->tableNamesN( 'categorylinks', 'page' ); + list( $categorylinks, $page, $page_props ) = $dbr->tableNamesN( 'categorylinks', 'page', 'page_props' ); return "SELECT 'Unusedcategories' as type, {$NScat} as namespace, page_title as title, page_title as value FROM $page LEFT JOIN $categorylinks ON page_title=cl_to + LEFT JOIN $page_props ON pp_page=page_id WHERE cl_from IS NULL AND page_namespace = {$NScat} - AND page_is_redirect = 0"; + AND page_is_redirect = 0 + AND (pp_propname IS NULL OR pp_propname != 'ignoreunused')"; } function formatResult( $skin, $result ) { Index: languages/messages/MessagesEn.php =================================================================== --- languages/messages/MessagesEn.php (revision 46189) +++ languages/messages/MessagesEn.php (working copy) @@ -327,6 +327,7 @@ 'filepath' => array( 0, 'FILEPATH:' ), 'tag' => array( 0, 'tag' ), 'hiddencat' => array( 1, '__HIDDENCAT__' ), + 'ignoreunused' => array( 1, '__IGNOREUNUSED__' ), 'pagesincategory' => array( 1, 'PAGESINCATEGORY', 'PAGESINCAT' ), 'pagesize' => array( 1, 'PAGESIZE' ), 'index' => array( 1, '__INDEX__' ),