X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialMostlinked.php;h=36636471295b8d9e4ba6c9bd7c8817ab04dae117;hb=e305dd6ced6360a33b612dfd5d7a1c5f8aeebcc7;hp=ae0b07087e3ebd21d92f37a0590bf0442d178b24;hpb=8b1a78fa5e62923d6dea1f9fe578c46b2910155e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialMostlinked.php b/includes/specials/SpecialMostlinked.php index ae0b07087e..3663647129 100644 --- a/includes/specials/SpecialMostlinked.php +++ b/includes/specials/SpecialMostlinked.php @@ -35,7 +35,7 @@ class MostlinkedPage extends QueryPage { parent::__construct( $name ); } - function isExpensive() { + public function isExpensive() { return true; } @@ -43,32 +43,32 @@ class MostlinkedPage extends QueryPage { return false; } - function getQueryInfo() { - return array( - 'tables' => array( 'pagelinks', 'page' ), - 'fields' => array( + public function getQueryInfo() { + return [ + 'tables' => [ 'pagelinks', 'page' ], + 'fields' => [ 'namespace' => 'pl_namespace', 'title' => 'pl_title', 'value' => 'COUNT(*)', 'page_namespace' - ), - 'options' => array( + ], + 'options' => [ 'HAVING' => 'COUNT(*) > 1', - 'GROUP BY' => array( + 'GROUP BY' => [ 'pl_namespace', 'pl_title', 'page_namespace' - ) - ), - 'join_conds' => array( - 'page' => array( + ] + ], + 'join_conds' => [ + 'page' => [ 'LEFT JOIN', - array( + [ 'page_namespace = pl_namespace', 'page_title = pl_title' - ) - ) - ) - ); + ] + ] + ] + ]; } /** @@ -116,7 +116,7 @@ class MostlinkedPage extends QueryPage { if ( !$title ) { return Html::element( 'span', - array( 'class' => 'mw-invalidtitle' ), + [ 'class' => 'mw-invalidtitle' ], Linker::getInvalidTitleDescription( $this->getContext(), $result->namespace,