/**
* @ingroup Pager
*/
-use MediaWiki\Block\BlockRestriction;
use MediaWiki\Block\Restriction\Restriction;
use MediaWiki\Block\Restriction\PageRestriction;
use MediaWiki\Block\Restriction\NamespaceRestriction;
*/
private function getRestrictionListHTML( stdClass $row ) {
$items = [];
+ $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
foreach ( $this->restrictions as $restriction ) {
if ( $restriction->getBlockId() !== (int)$row->ipb_id ) {
$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,
[],
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();