40 private $linkBatchFactory;
43 private $blockRestrictionStore;
46 private $loadBalancer;
49 private $commentStore;
55 private $blockActionInfo;
58 private $rowCommentFormatter;
78 parent::__construct(
'AutoblockList' );
80 $this->linkBatchFactory = $linkBatchFactory;
81 $this->blockRestrictionStore = $blockRestrictionStore;
82 $this->loadBalancer = $loadBalancer;
83 $this->commentStore = $commentStore;
84 $this->blockUtils = $blockUtils;
85 $this->blockActionInfo = $blockActionInfo;
86 $this->rowCommentFormatter = $rowCommentFormatter;
96 $out->setPageTitle( $this->
msg(
'autoblocklist' ) );
98 $out->addModuleStyles( [
'mediawiki.special' ] );
100 # setup BlockListPager here to get the actual default Limit
103 # Just show the block list
106 'type' =>
'limitselect',
107 'label-message' =>
'table_pager_limit_label',
108 'options' => $pager->getLimitSelectList(),
110 'default' => $pager->getLimit(),
114 $form = HTMLForm::factory(
'ooui', $fields, $this->
getContext() );
115 $form->setMethod(
'get' )
117 ->setFormIdentifier(
'blocklist' )
118 ->setWrapperLegendMsg(
'autoblocklist-legend' )
119 ->setSubmitTextMsg(
'autoblocklist-submit' )
121 ->displayForm(
false );
133 'ipb_parent_block_id IS NOT NULL'
135 # Is the user allowed to see hidden blocks?
136 if ( !$this->
getAuthority()->isAllowed(
'hideuser' ) ) {
137 $conds[
'ipb_deleted'] = 0;
142 $this->blockActionInfo,
143 $this->blockRestrictionStore,
146 $this->linkBatchFactory,
149 $this->rowCommentFormatter,
163 Html::rawElement(
'div', [
'style' =>
'font-weight: bold;' ],
176 # Check for other blocks, i.e. global/tor blocks
177 $otherAutoblockLink = [];
178 $this->
getHookRunner()->onOtherAutoblockLogLink( $otherAutoblockLink );
180 # Show additional header for the local block only when other blocks exists.
181 # Not necessary in a standard installation without such extensions enabled
182 if ( count( $otherAutoblockLink ) ) {
184 Html::rawElement(
'h2', [], $this->
msg(
'autoblocklist-localblocks',
193 $out->addWikiMsg(
'autoblocklist-empty' );
196 if ( count( $otherAutoblockLink ) ) {
201 $this->
msg(
'autoblocklist-otherblocks', count( $otherAutoblockLink ) )->parse()
205 foreach ( $otherAutoblockLink as $link ) {
206 $list .= Html::rawElement(
'li', [], $link ) .
"\n";
211 [
'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.