X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialMostlinkedtemplates.php;h=c90acb1f9a5776b2b46f8be75b8580a56d88f49d;hb=e1d2897df11a58163212729a99f5c98e50a6ce52;hp=2590cf883b2e09db51f38b4dadc61135cc5edcc8;hpb=1e8a9aba9ca7f604f2af34b7d3e2efffc05888f1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialMostlinkedtemplates.php b/includes/specials/SpecialMostlinkedtemplates.php index 2590cf883b..c90acb1f9a 100644 --- a/includes/specials/SpecialMostlinkedtemplates.php +++ b/includes/specials/SpecialMostlinkedtemplates.php @@ -29,7 +29,6 @@ * @ingroup SpecialPage */ class MostlinkedTemplatesPage extends QueryPage { - function __construct( $name = 'Mostlinkedtemplates' ) { parent::__construct( $name ); } @@ -64,9 +63,11 @@ class MostlinkedTemplatesPage extends QueryPage { public function getQueryInfo() { return array( 'tables' => array( 'templatelinks' ), - 'fields' => array( 'namespace' => 'tl_namespace', - 'title' => 'tl_title', - 'value' => 'COUNT(*)' ), + 'fields' => array( + 'namespace' => 'tl_namespace', + 'title' => 'tl_title', + 'value' => 'COUNT(*)' + ), 'conds' => array( 'tl_namespace' => NS_TEMPLATE ), 'options' => array( 'GROUP BY' => array( 'tl_namespace', 'tl_title' ) ) ); @@ -102,8 +103,15 @@ class MostlinkedTemplatesPage extends QueryPage { public function formatResult( $skin, $result ) { $title = Title::makeTitleSafe( $result->namespace, $result->title ); if ( !$title ) { - return Html::element( 'span', array( 'class' => 'mw-invalidtitle' ), - Linker::getInvalidTitleDescription( $this->getContext(), $result->namespace, $result->title ) ); + return Html::element( + 'span', + array( 'class' => 'mw-invalidtitle' ), + Linker::getInvalidTitleDescription( + $this->getContext(), + $result->namespace, + $result->title + ) + ); } return $this->getLanguage()->specialList( @@ -122,6 +130,7 @@ class MostlinkedTemplatesPage extends QueryPage { private function makeWlhLink( $title, $result ) { $wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedText() ); $label = $this->msg( 'ntransclusions' )->numParams( $result->value )->escaped(); + return Linker::link( $wlh, $label ); }