X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2Fpagers%2FBlockListPager.php;h=a2dbb72f99d7edbdf9d6ebc731910221241e6996;hb=632a82ec8e03ea701f257b96bc092d520385c47e;hp=2b8d1d5fee8f814d03e8a29c7dd51321eb908a53;hpb=f28f7a0d0f322b299dd3cdd3b7b02a364b269958;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/pagers/BlockListPager.php b/includes/specials/pagers/BlockListPager.php index 2b8d1d5fee..a2dbb72f99 100644 --- a/includes/specials/pagers/BlockListPager.php +++ b/includes/specials/pagers/BlockListPager.php @@ -22,7 +22,6 @@ /** * @ingroup Pager */ -use MediaWiki\Block\BlockRestriction; use MediaWiki\Block\Restriction\Restriction; use MediaWiki\Block\Restriction\PageRestriction; use MediaWiki\Block\Restriction\NamespaceRestriction; @@ -191,10 +190,8 @@ class BlockListPager extends TablePager { case 'ipb_params': $properties = []; - if ( $this->getConfig()->get( 'EnablePartialBlocks' ) ) { - if ( $row->ipb_sitewide ) { - $properties[] = htmlspecialchars( $msg['blocklist-editing-sitewide'] ); - } + if ( $this->getConfig()->get( 'EnablePartialBlocks' ) && $row->ipb_sitewide ) { + $properties[] = htmlspecialchars( $msg['blocklist-editing-sitewide'] ); } if ( !$row->ipb_sitewide && $this->restrictions ) { @@ -252,6 +249,7 @@ class BlockListPager extends TablePager { */ private function getRestrictionListHTML( stdClass $row ) { $items = []; + $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer(); foreach ( $this->restrictions as $restriction ) { if ( $restriction->getBlockId() !== (int)$row->ipb_id ) { @@ -264,20 +262,20 @@ class BlockListPager extends TablePager { $items[$restriction->getType()][] = Html::rawElement( 'li', [], - Linker::link( $restriction->getTitle() ) + $linkRenderer->makeLink( $restriction->getTitle() ) ); } break; case NamespaceRestriction::TYPE: $text = $restriction->getValue() === NS_MAIN - ? $this->msg( 'blanknamespace' ) + ? $this->msg( 'blanknamespace' )->text() : $this->getLanguage()->getFormattedNsText( $restriction->getValue() ); $items[$restriction->getType()][] = Html::rawElement( 'li', [], - Linker::link( + $linkRenderer->makeLink( SpecialPage::getTitleValueFor( 'Allpages' ), $text, [], @@ -421,7 +419,8 @@ class BlockListPager extends TablePager { if ( $partialBlocks ) { // Mutations to the $row object are not persisted. The restrictions will // need be stored in a separate store. - $this->restrictions = BlockRestriction::loadByBlockId( $partialBlocks ); + $blockRestrictionStore = MediaWikiServices::getInstance()->getBlockRestrictionStore(); + $this->restrictions = $blockRestrictionStore->loadByBlockId( $partialBlocks ); } $lb->execute();