X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUnusedcategories.php;h=c897332818dda7fe60345203e1c333bb9b8dbd15;hb=3714791bb1960785f488b72446d65e22bfb70e4c;hp=6b91dd399ec9be48ec5022c173e5d300437d2610;hpb=83d509123c35196df82e01824ded68ef6fbf0cee;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUnusedcategories.php b/includes/specials/SpecialUnusedcategories.php index 6b91dd399e..c897332818 100644 --- a/includes/specials/SpecialUnusedcategories.php +++ b/includes/specials/SpecialUnusedcategories.php @@ -39,16 +39,19 @@ 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' ) ) + 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' ) ) ); } @@ -60,8 +63,14 @@ class UnusedCategoriesPage extends QueryPage { return false; } + /** + * @param Skin $skin + * @param object $result Result row + * @return string + */ function formatResult( $skin, $result ) { $title = Title::makeTitle( NS_CATEGORY, $result->title ); + return Linker::link( $title, htmlspecialchars( $title->getText() ) ); }