Merge "Add ext-dom to composer.json"
[lhc/web/wiklou.git] / includes / specials / pagers / BlockListPager.php
index 01aed22..d61a1be 100644 (file)
@@ -45,9 +45,9 @@ class BlockListPager extends TablePager {
         * @param array $conds
         */
        public function __construct( $page, $conds ) {
+               parent::__construct( $page->getContext(), $page->getLinkRenderer() );
                $this->conds = $conds;
                $this->mDefaultDirection = IndexPager::DIR_DESCENDING;
-               parent::__construct( $page->getContext() );
        }
 
        function getFieldNames() {
@@ -70,6 +70,12 @@ class BlockListPager extends TablePager {
                return $headers;
        }
 
+       /**
+        * @param string $name
+        * @param string $value
+        * @return string
+        * @suppress PhanTypeArraySuspiciousNullable
+        */
        function formatValue( $name, $value ) {
                static $msg = null;
                if ( $msg === null ) {
@@ -97,7 +103,7 @@ class BlockListPager extends TablePager {
 
                $formatted = '';
 
-               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
+               $linkRenderer = $this->getLinkRenderer();
 
                switch ( $name ) {
                        case 'ipb_timestamp':
@@ -250,7 +256,7 @@ class BlockListPager extends TablePager {
         */
        private function getRestrictionListHTML( stdClass $row ) {
                $items = [];
-               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
+               $linkRenderer = $this->getLinkRenderer();
 
                foreach ( $this->restrictions as $restriction ) {
                        if ( $restriction->getBlockId() !== (int)$row->ipb_id ) {