Merge "Use WatchedItemStore::countWatchers in SpecialWatchlist"
[lhc/web/wiklou.git] / includes / specials / SpecialMostcategories.php
index 9b67f34..06d21d5 100644 (file)
@@ -34,7 +34,7 @@ class MostcategoriesPage extends QueryPage {
                parent::__construct( $name );
        }
 
-       function isExpensive() {
+       public function isExpensive() {
                return true;
        }
 
@@ -42,30 +42,30 @@ class MostcategoriesPage extends QueryPage {
                return false;
        }
 
-       function getQueryInfo() {
-               return array(
-                       'tables' => array( 'categorylinks', 'page' ),
-                       'fields' => array(
+       public function getQueryInfo() {
+               return [
+                       'tables' => [ 'categorylinks', 'page' ],
+                       'fields' => [
                                'namespace' => 'page_namespace',
                                'title' => 'page_title',
                                'value' => 'COUNT(*)'
-                       ),
-                       'conds' => array( 'page_namespace' => MWNamespace::getContentNamespaces() ),
-                       'options' => array(
+                       ],
+                       'conds' => [ 'page_namespace' => MWNamespace::getContentNamespaces() ],
+                       'options' => [
                                'HAVING' => 'COUNT(*) > 1',
-                               'GROUP BY' => array( 'page_namespace', 'page_title' )
-                       ),
-                       'join_conds' => array(
-                               'page' => array(
+                               'GROUP BY' => [ 'page_namespace', 'page_title' ]
+                       ],
+                       'join_conds' => [
+                               'page' => [
                                        'LEFT JOIN',
                                        'page_id = cl_from'
-                               )
-                       )
-               );
+                               ]
+                       ]
+               ];
        }
 
        /**
-        * @param DatabaseBase $db
+        * @param IDatabase $db
         * @param ResultWrapper $res
         */
        function preprocessResults( $db, $res ) {
@@ -94,7 +94,7 @@ class MostcategoriesPage extends QueryPage {
                if ( !$title ) {
                        return Html::element(
                                'span',
-                               array( 'class' => 'mw-invalidtitle' ),
+                               [ 'class' => 'mw-invalidtitle' ],
                                Linker::getInvalidTitleDescription(
                                        $this->getContext(),
                                        $result->namespace,