Merge "Enable $wgVectorUseIconWatch by default."
[lhc/web/wiklou.git] / includes / specials / SpecialUnusedtemplates.php
index eaf0544..493e936 100644 (file)
@@ -34,17 +34,25 @@ class UnusedtemplatesPage extends QueryPage {
        function __construct( $name = 'Unusedtemplates' ) {
                parent::__construct( $name );
        }
-       
-       function isExpensive() { return true; }
-       function isSyndicated() { return false; }
-       function sortDescending() { return false; }
+
+       function isExpensive() {
+               return true;
+       }
+
+       function isSyndicated() {
+               return false;
+       }
+
+       function sortDescending() {
+               return false;
+       }
 
        function getQueryInfo() {
                return array (
                        'tables' => array ( 'page', 'templatelinks' ),
-                       'fields' => array ( 'page_namespace AS namespace',
-                                       'page_title AS title',
-                                       'page_title AS value' ),
+                       'fields' => array ( 'namespace' => 'page_namespace',
+                                       'title' => 'page_title',
+                                       'value' => 'page_title' ),
                        'conds' => array ( 'page_namespace' => NS_TEMPLATE,
                                        'tl_from IS NULL',
                                        'page_is_redirect' => 0 ),
@@ -53,27 +61,32 @@ class UnusedtemplatesPage extends QueryPage {
                                        'tl_namespace = page_namespace' ) ) )
                );
        }
-       
+
+       /**
+        * @param $skin Skin
+        * @param $result
+        * @return string
+        */
        function formatResult( $skin, $result ) {
                $title = Title::makeTitle( NS_TEMPLATE, $result->title );
-               $pageLink = $skin->linkKnown(
+               $pageLink = Linker::linkKnown(
                        $title,
                        null,
                        array(),
                        array( 'redirect' => 'no' )
                );
-               $wlhLink = $skin->linkKnown(
-                       SpecialPage::getTitleFor( 'Whatlinkshere' ),
-                       wfMsgHtml( 'unusedtemplateswlh' ),
-                       array(),
-                       array( 'target' => $title->getPrefixedText() )
+               $wlhLink = Linker::linkKnown(
+                       SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedText() ),
+                       $this->msg( 'unusedtemplateswlh' )->escaped()
                );
-               return wfSpecialList( $pageLink, $wlhLink );
+               return $this->getLanguage()->specialList( $pageLink, $wlhLink );
        }
 
        function getPageHeader() {
-               return wfMsgExt( 'unusedtemplatestext', array( 'parse' ) );
+               return $this->msg( 'unusedtemplatestext' )->parseAsBlock();
        }
 
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }
-