*/
use Wikimedia\Rdbms\IResultWrapper;
-use MediaWiki\Block\BlockRestriction;
+use MediaWiki\MediaWikiServices;
/**
* Query module to enumerate all user blocks
$this->addWhereIf( 'ipb_range_end > ipb_range_start', isset( $show['range'] ) );
}
- if ( !$this->getUser()->isAllowed( 'hideuser' ) ) {
+ if ( !$this->getPermissionManager()->userHasRight( $this->getUser(), 'hideuser' ) ) {
$this->addWhereFld( 'ipb_deleted', 0 );
}
}
}
- $restrictions = BlockRestriction::loadByBlockId( $partialIds );
+ $blockRestrictionStore = MediaWikiServices::getInstance()->getBlockRestrictionStore();
+ $restrictions = $blockRestrictionStore->loadByBlockId( $partialIds );
$data = [];
$keys = [
$id = $restriction->getBlockId();
switch ( $restriction->getType() ) {
case 'page':
+ /** @var \MediaWiki\Block\Restriction\PageRestriction $restriction */
+ '@phan-var \MediaWiki\Block\Restriction\PageRestriction $restriction';
$value = [ 'id' => $restriction->getValue() ];
if ( $restriction->getTitle() ) {
self::addTitleInfo( $value, $restriction->getTitle() );