X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUnusedcategories.php;h=0d3216cd8153c331cb88f082303780d12ef983a0;hb=4618f70793d1178ca4c646ef397cf17b1cc70b44;hp=b686a5b5d2c4fdf206ec6b0c52fcd31f5b7f7d14;hpb=59183f670a9e60975632414b25b05f16edf06485;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUnusedcategories.php b/includes/specials/SpecialUnusedcategories.php index b686a5b5d2..0d3216cd81 100644 --- a/includes/specials/SpecialUnusedcategories.php +++ b/includes/specials/SpecialUnusedcategories.php @@ -25,30 +25,32 @@ * @ingroup SpecialPage */ class UnusedCategoriesPage extends QueryPage { - - function isExpensive() { - return true; - } - function __construct( $name = 'Unusedcategories' ) { parent::__construct( $name ); } + public function isExpensive() { + return true; + } + function getPageHeader() { return $this->msg( 'unusedcategoriestext' )->parseAsBlock(); } - function getQueryInfo() { + public function getQueryInfo() { return array( 'tables' => array( 'page', 'categorylinks' ), - 'fields' => array( 'namespace' => 'page_namespace', - 'title' => 'page_title', - 'value' => 'page_title' ), - 'conds' => array( 'cl_from IS NULL', - 'page_namespace' => NS_CATEGORY, - 'page_is_redirect' => 0 ), - 'join_conds' => array( 'categorylinks' => array( - 'LEFT JOIN', 'cl_to = page_title' ) ) + 'fields' => array( + 'namespace' => 'page_namespace', + 'title' => 'page_title', + 'value' => 'page_title' + ), + 'conds' => array( + 'cl_from IS NULL', + 'page_namespace' => NS_CATEGORY, + 'page_is_redirect' => 0 + ), + 'join_conds' => array( 'categorylinks' => array( 'LEFT JOIN', 'cl_to = page_title' ) ) ); } @@ -67,6 +69,7 @@ class UnusedCategoriesPage extends QueryPage { */ function formatResult( $skin, $result ) { $title = Title::makeTitle( NS_CATEGORY, $result->title ); + return Linker::link( $title, htmlspecialchars( $title->getText() ) ); }