X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUnusedtemplates.php;h=f73be438391297beeb2c0dcb43d93792e19e7720;hb=325e6a1b9d37d239b96caba45a1d18f826c11f8a;hp=33444f637a5b81a06f9f2e505d07786b3d9980e5;hpb=ac17fbac94f2ba72b3ac64fff2dd188dd76faaf3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUnusedtemplates.php b/includes/specials/SpecialUnusedtemplates.php index 33444f637a..f73be43839 100644 --- a/includes/specials/SpecialUnusedtemplates.php +++ b/includes/specials/SpecialUnusedtemplates.php @@ -47,22 +47,22 @@ class UnusedtemplatesPage extends QueryPage { } public function getQueryInfo() { - return array( - 'tables' => array( 'page', 'templatelinks' ), - 'fields' => array( + return [ + 'tables' => [ 'page', 'templatelinks' ], + 'fields' => [ 'namespace' => 'page_namespace', 'title' => 'page_title', 'value' => 'page_title' - ), - 'conds' => array( + ], + 'conds' => [ 'page_namespace' => NS_TEMPLATE, 'tl_from IS NULL', 'page_is_redirect' => 0 - ), - 'join_conds' => array( 'templatelinks' => array( - 'LEFT JOIN', array( 'tl_title = page_title', - 'tl_namespace = page_namespace' ) ) ) - ); + ], + 'join_conds' => [ 'templatelinks' => [ + 'LEFT JOIN', [ 'tl_title = page_title', + 'tl_namespace = page_namespace' ] ] ] + ]; } /** @@ -71,16 +71,17 @@ class UnusedtemplatesPage extends QueryPage { * @return string */ function formatResult( $skin, $result ) { + $linkRenderer = $this->getLinkRenderer(); $title = Title::makeTitle( NS_TEMPLATE, $result->title ); - $pageLink = Linker::linkKnown( + $pageLink = $linkRenderer->makeKnownLink( $title, null, - array(), - array( 'redirect' => 'no' ) + [], + [ 'redirect' => 'no' ] ); - $wlhLink = Linker::linkKnown( + $wlhLink = $linkRenderer->makeKnownLink( SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedText() ), - $this->msg( 'unusedtemplateswlh' )->escaped() + $this->msg( 'unusedtemplateswlh' )->text() ); return $this->getLanguage()->specialList( $pageLink, $wlhLink );