72 parent::__construct(
'AutoblockList' );
74 $this->linkBatchFactory = $linkBatchFactory;
75 $this->blockRestrictionStore = $blockRestrictionStore;
76 $this->dbProvider = $dbProvider;
77 $this->commentStore = $commentStore;
78 $this->blockUtils = $blockUtils;
79 $this->blockActionInfo = $blockActionInfo;
80 $this->rowCommentFormatter = $rowCommentFormatter;
90 $out->setPageTitleMsg( $this->
msg(
'autoblocklist' ) );
92 $out->addModuleStyles( [
'mediawiki.special' ] );
94 # setup BlockListPager here to get the actual default Limit
97 # Just show the block list
100 'type' =>
'limitselect',
101 'label-message' =>
'table_pager_limit_label',
102 'options' => $pager->getLimitSelectList(),
104 'default' => $pager->getLimit(),
108 $form = HTMLForm::factory(
'ooui', $fields, $this->
getContext() );
109 $form->setMethod(
'get' )
111 ->setFormIdentifier(
'blocklist' )
112 ->setWrapperLegendMsg(
'autoblocklist-legend' )
113 ->setSubmitTextMsg(
'autoblocklist-submit' )
115 ->displayForm(
false );
127 'ipb_parent_block_id IS NOT NULL',
129 'ipb_parent_block_id <> 0',
131 # Is the user allowed to see hidden blocks?
132 if ( !$this->
getAuthority()->isAllowed(
'hideuser' ) ) {
133 $conds[
'ipb_deleted'] = 0;
138 $this->blockActionInfo,
139 $this->blockRestrictionStore,
142 $this->linkBatchFactory,
145 $this->rowCommentFormatter,
159 Html::rawElement(
'div', [
'style' =>
'font-weight: bold;' ],
172 # Check for other blocks, i.e. global/tor blocks
173 $otherAutoblockLink = [];
174 $this->
getHookRunner()->onOtherAutoblockLogLink( $otherAutoblockLink );
176 # Show additional header for the local block only when other blocks exists.
177 # Not necessary in a standard installation without such extensions enabled
178 if ( count( $otherAutoblockLink ) ) {
180 Html::rawElement(
'h2', [], $this->
msg(
'autoblocklist-localblocks',
189 $out->addWikiMsg(
'autoblocklist-empty' );
192 if ( count( $otherAutoblockLink ) ) {
197 $this->
msg(
'autoblocklist-otherblocks', count( $otherAutoblockLink ) )->parse()
201 foreach ( $otherAutoblockLink as $link ) {
202 $list .= Html::rawElement(
'li', [], $link ) .
"\n";
207 [
'class' =>
'mw-autoblocklist-otherblocks' ],
222class_alias( SpecialAutoblockList::class,
'SpecialAutoblockList' );
Parent class for all special pages.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getPageTitle( $subpage=false)
Get a self-referential title object.
getContext()
Gets the context this SpecialPage is executed in.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
getAuthority()
Shortcut to get the Authority executing this instance.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.