24 namespace MediaWiki\Specials;
47 private $linkBatchFactory;
50 private $blockRestrictionStore;
56 private $commentStore;
62 private $blockActionInfo;
65 private $rowCommentFormatter;
85 parent::__construct(
'AutoblockList' );
87 $this->linkBatchFactory = $linkBatchFactory;
88 $this->blockRestrictionStore = $blockRestrictionStore;
89 $this->dbProvider = $dbProvider;
90 $this->commentStore = $commentStore;
91 $this->blockUtils = $blockUtils;
92 $this->blockActionInfo = $blockActionInfo;
93 $this->rowCommentFormatter = $rowCommentFormatter;
103 $out->setPageTitle( $this->
msg(
'autoblocklist' ) );
105 $out->addModuleStyles( [
'mediawiki.special' ] );
107 # setup BlockListPager here to get the actual default Limit
110 # Just show the block list
113 'type' =>
'limitselect',
114 'label-message' =>
'table_pager_limit_label',
115 'options' => $pager->getLimitSelectList(),
117 'default' => $pager->getLimit(),
122 $form->setMethod(
'get' )
124 ->setFormIdentifier(
'blocklist' )
125 ->setWrapperLegendMsg(
'autoblocklist-legend' )
126 ->setSubmitTextMsg(
'autoblocklist-submit' )
128 ->displayForm(
false );
140 'ipb_parent_block_id IS NOT NULL',
142 'ipb_parent_block_id <> 0',
144 # Is the user allowed to see hidden blocks?
145 if ( !$this->
getAuthority()->isAllowed(
'hideuser' ) ) {
146 $conds[
'ipb_deleted'] = 0;
151 $this->blockActionInfo,
152 $this->blockRestrictionStore,
155 $this->linkBatchFactory,
158 $this->rowCommentFormatter,
185 # Check for other blocks, i.e. global/tor blocks
186 $otherAutoblockLink = [];
187 $this->
getHookRunner()->onOtherAutoblockLogLink( $otherAutoblockLink );
189 # Show additional header for the local block only when other blocks exists.
190 # Not necessary in a standard installation without such extensions enabled
191 if ( count( $otherAutoblockLink ) ) {
202 $out->addWikiMsg(
'autoblocklist-empty' );
205 if ( count( $otherAutoblockLink ) ) {
210 $this->
msg(
'autoblocklist-otherblocks', count( $otherAutoblockLink ) )->parse()
214 foreach ( $otherAutoblockLink as $link ) {
220 [
'class' =>
'mw-autoblocklist-otherblocks' ],
235 class_alias( SpecialAutoblockList::class,
'SpecialAutoblockList' );
Parent class for all special pages.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getOutput()
Get the OutputPage being used for this instance.
getContext()
Gets the context this SpecialPage is executed in.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getAuthority()
Shortcut to get the Authority executing this instance.
getPageTitle( $subpage=false)
Get a self-referential title object.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.