X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialFewestrevisions.php;h=b86a95e8aaa6d994f9498206cbe73a7e2b2fb84c;hb=c2e2afbc900dda1228f8ea6f5a3609d569fce00a;hp=dc9d57c2ee577b6ff9c1284dad21f9bdcb45ad24;hpb=bd2a78a159ce6d9f7b27fd75d05570228b44c3cb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialFewestrevisions.php b/includes/specials/SpecialFewestrevisions.php index dc9d57c2ee..b86a95e8aa 100644 --- a/includes/specials/SpecialFewestrevisions.php +++ b/includes/specials/SpecialFewestrevisions.php @@ -32,7 +32,7 @@ class FewestrevisionsPage extends QueryPage { parent::__construct( $name ); } - function isExpensive() { + public function isExpensive() { return true; } @@ -40,28 +40,28 @@ class FewestrevisionsPage extends QueryPage { return false; } - function getQueryInfo() { - return array( - 'tables' => array( 'revision', 'page' ), - 'fields' => array( + public function getQueryInfo() { + return [ + 'tables' => [ 'revision', 'page' ], + 'fields' => [ 'namespace' => 'page_namespace', 'title' => 'page_title', 'value' => 'COUNT(*)', 'redirect' => 'page_is_redirect' - ), - 'conds' => array( + ], + 'conds' => [ 'page_namespace' => MWNamespace::getContentNamespaces(), - 'page_id = rev_page' ), - 'options' => array( + 'page_id = rev_page' ], + 'options' => [ 'HAVING' => 'COUNT(*) > 1', // ^^^ This was probably here to weed out redirects. // Since we mark them as such now, it might be // useful to remove this. People _do_ create pages // and never revise them, they aren't necessarily // redirects. - 'GROUP BY' => array( 'page_namespace', 'page_title', 'page_is_redirect' ) - ) - ); + 'GROUP BY' => [ 'page_namespace', 'page_title', 'page_is_redirect' ] + ] + ]; } function sortDescending() { @@ -80,7 +80,7 @@ class FewestrevisionsPage extends QueryPage { if ( !$nt ) { return Html::element( 'span', - array( 'class' => 'mw-invalidtitle' ), + [ 'class' => 'mw-invalidtitle' ], Linker::getInvalidTitleDescription( $this->getContext(), $result->namespace, @@ -98,8 +98,8 @@ class FewestrevisionsPage extends QueryPage { $nlink = Linker::linkKnown( $nt, $nl, - array(), - array( 'action' => 'history' ) + [], + [ 'action' => 'history' ] ) . $redirect; return $this->getLanguage()->specialList( $plink, $nlink );