Use WatchedItemStore::countWatchers in SpecialWatchlist
[lhc/web/wiklou.git] / includes / specials / SpecialUnusedtemplates.php
index 0c2b870..b0a2579 100644 (file)
@@ -34,7 +34,7 @@ class UnusedtemplatesPage extends QueryPage {
                parent::__construct( $name );
        }
 
-       function isExpensive() {
+       public function isExpensive() {
                return true;
        }
 
@@ -46,23 +46,23 @@ class UnusedtemplatesPage extends QueryPage {
                return false;
        }
 
-       function getQueryInfo() {
-               return array(
-                       'tables' => array( 'page', 'templatelinks' ),
-                       'fields' => array(
+       public function getQueryInfo() {
+               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' ] ] ]
+               ];
        }
 
        /**
@@ -75,8 +75,8 @@ class UnusedtemplatesPage extends QueryPage {
                $pageLink = Linker::linkKnown(
                        $title,
                        null,
-                       array(),
-                       array( 'redirect' => 'no' )
+                       [],
+                       [ 'redirect' => 'no' ]
                );
                $wlhLink = Linker::linkKnown(
                        SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedText() ),