Merge "Special:RC tests: ignore order when asserting conditions"
[lhc/web/wiklou.git] / includes / specials / SpecialUnusedcategories.php
index 0d3216c..ec39ccf 100644 (file)
@@ -38,20 +38,20 @@ class UnusedCategoriesPage extends QueryPage {
        }
 
        public function getQueryInfo() {
-               return array(
-                       'tables' => array( 'page', 'categorylinks' ),
-                       'fields' => array(
+               return [
+                       'tables' => [ 'page', 'categorylinks' ],
+                       'fields' => [
                                'namespace' => 'page_namespace',
                                'title' => 'page_title',
                                'value' => 'page_title'
-                       ),
-                       'conds' => array(
+                       ],
+                       'conds' => [
                                'cl_from IS NULL',
                                'page_namespace' => NS_CATEGORY,
                                'page_is_redirect' => 0
-                       ),
-                       'join_conds' => array( 'categorylinks' => array( 'LEFT JOIN', 'cl_to = page_title' ) )
-               );
+                       ],
+                       'join_conds' => [ 'categorylinks' => [ 'LEFT JOIN', 'cl_to = page_title' ] ]
+               ];
        }
 
        /**
@@ -70,10 +70,14 @@ class UnusedCategoriesPage extends QueryPage {
        function formatResult( $skin, $result ) {
                $title = Title::makeTitle( NS_CATEGORY, $result->title );
 
-               return Linker::link( $title, htmlspecialchars( $title->getText() ) );
+               return $this->getLinkRenderer()->makeLink( $title, $title->getText() );
        }
 
        protected function getGroupName() {
                return 'maintenance';
        }
+
+       public function preprocessResults( $db, $res ) {
+               $this->executeLBFromResultWrapper( $res );
+       }
 }