42 private $linkBatchFactory;
45 private $blockRestrictionStore;
48 private $loadBalancer;
51 private $commentStore;
57 private $blockActionInfo;
60 private $rowCommentFormatter;
80 parent::__construct(
'AutoblockList' );
82 $this->linkBatchFactory = $linkBatchFactory;
83 $this->blockRestrictionStore = $blockRestrictionStore;
84 $this->loadBalancer = $loadBalancer;
85 $this->commentStore = $commentStore;
86 $this->blockUtils = $blockUtils;
87 $this->blockActionInfo = $blockActionInfo;
88 $this->rowCommentFormatter = $rowCommentFormatter;
98 $out->setPageTitle( $this->
msg(
'autoblocklist' ) );
100 $out->addModuleStyles( [
'mediawiki.special' ] );
102 # setup BlockListPager here to get the actual default Limit
105 # Just show the block list
108 'type' =>
'limitselect',
109 'label-message' =>
'table_pager_limit_label',
110 'options' => $pager->getLimitSelectList(),
112 'default' => $pager->getLimit(),
116 $form = HTMLForm::factory(
'ooui', $fields, $this->
getContext() );
117 $form->setMethod(
'get' )
119 ->setFormIdentifier(
'blocklist' )
120 ->setWrapperLegendMsg(
'autoblocklist-legend' )
121 ->setSubmitTextMsg(
'autoblocklist-submit' )
123 ->displayForm(
false );
135 'ipb_parent_block_id IS NOT NULL',
137 'ipb_parent_block_id <> 0',
139 # Is the user allowed to see hidden blocks?
140 if ( !$this->
getAuthority()->isAllowed(
'hideuser' ) ) {
141 $conds[
'ipb_deleted'] = 0;
146 $this->blockActionInfo,
147 $this->blockRestrictionStore,
150 $this->linkBatchFactory,
153 $this->rowCommentFormatter,
167 Html::rawElement(
'div', [
'style' =>
'font-weight: bold;' ],
180 # Check for other blocks, i.e. global/tor blocks
181 $otherAutoblockLink = [];
182 $this->
getHookRunner()->onOtherAutoblockLogLink( $otherAutoblockLink );
184 # Show additional header for the local block only when other blocks exists.
185 # Not necessary in a standard installation without such extensions enabled
186 if ( count( $otherAutoblockLink ) ) {
188 Html::rawElement(
'h2', [], $this->
msg(
'autoblocklist-localblocks',
197 $out->addWikiMsg(
'autoblocklist-empty' );
200 if ( count( $otherAutoblockLink ) ) {
205 $this->
msg(
'autoblocklist-otherblocks', count( $otherAutoblockLink ) )->parse()
209 foreach ( $otherAutoblockLink as $link ) {
210 $list .= Html::rawElement(
'li', [], $link ) .
"\n";
215 [
'class' =>
'mw-autoblocklist-otherblocks' ],
A special page that lists autoblocks.
getBlockListPager()
Setup a new BlockListPager instance.
showList(BlockListPager $pager)
Show the list of blocked accounts matching the actual filter.
__construct(LinkBatchFactory $linkBatchFactory, BlockRestrictionStore $blockRestrictionStore, ILoadBalancer $loadBalancer, CommentStore $commentStore, BlockUtils $blockUtils, BlockActionInfo $blockActionInfo, RowCommentFormatter $rowCommentFormatter)
showTotal(BlockListPager $pager)
Show total number of autoblocks on top of the table.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
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.