X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUnusedcategories.php;h=713823bb620532a1b536c45a31eb00fe4b1c664b;hb=82ce368f80b2b2645e379abfcac84b41f8962bd0;hp=b686a5b5d2c4fdf206ec6b0c52fcd31f5b7f7d14;hpb=dfc977826c591f1087159c4794bab254b9cb34bf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUnusedcategories.php b/includes/specials/SpecialUnusedcategories.php index b686a5b5d2..713823bb62 100644 --- a/includes/specials/SpecialUnusedcategories.php +++ b/includes/specials/SpecialUnusedcategories.php @@ -25,15 +25,14 @@ * @ingroup SpecialPage */ class UnusedCategoriesPage extends QueryPage { + function __construct( $name = 'Unusedcategories' ) { + parent::__construct( $name ); + } function isExpensive() { return true; } - function __construct( $name = 'Unusedcategories' ) { - parent::__construct( $name ); - } - function getPageHeader() { return $this->msg( 'unusedcategoriestext' )->parseAsBlock(); } @@ -41,14 +40,17 @@ class UnusedCategoriesPage extends QueryPage { 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() ) ); }