73 parent::__construct(
'AutoblockList' );
75 $this->linkBatchFactory = $linkBatchFactory;
76 $this->blockRestrictionStore = $blockRestrictionStore;
77 $this->dbProvider = $dbProvider;
78 $this->commentStore = $commentStore;
79 $this->blockUtils = $blockUtils;
80 $this->hideUserUtils = $hideUserUtils;
81 $this->blockActionInfo = $blockActionInfo;
82 $this->rowCommentFormatter = $rowCommentFormatter;
92 $out->setPageTitleMsg( $this->
msg(
'autoblocklist' ) );
94 $out->addModuleStyles( [
'mediawiki.special' ] );
96 # setup BlockListPager here to get the actual default Limit
99 # Just show the block list
102 'type' =>
'limitselect',
103 'label-message' =>
'table_pager_limit_label',
104 'options' => $pager->getLimitSelectList(),
106 'default' => $pager->getLimit(),
110 $form = HTMLForm::factory(
'ooui', $fields, $this->
getContext() );
111 $form->setMethod(
'get' )
113 ->setFormIdentifier(
'blocklist' )
114 ->setWrapperLegendMsg(
'autoblocklist-legend' )
115 ->setSubmitTextMsg(
'autoblocklist-submit' )
117 ->displayForm(
false );
128 $this->dbProvider->getReplicaDatabase()->expr(
'bl_parent_block_id',
'!=',
null ),
130 # Is the user allowed to see hidden blocks?
131 if ( !$this->
getAuthority()->isAllowed(
'hideuser' ) ) {
132 $conds[
'bl_deleted'] = 0;
137 $this->blockActionInfo,
138 $this->blockRestrictionStore,
140 $this->hideUserUtils,
142 $this->linkBatchFactory,
145 $this->rowCommentFormatter,
158 # Check for other blocks, i.e. global/tor blocks
159 $otherAutoblockLink = [];
160 $this->
getHookRunner()->onOtherAutoblockLogLink( $otherAutoblockLink );
162 # Show additional header for the local block only when other blocks exists.
163 # Not necessary in a standard installation without such extensions enabled
164 if ( count( $otherAutoblockLink ) ) {
166 Html::rawElement(
'h2', [], $this->
msg(
'autoblocklist-localblocks',
175 $out->addWikiMsg(
'autoblocklist-empty' );
178 if ( count( $otherAutoblockLink ) ) {
183 $this->
msg(
'autoblocklist-otherblocks', count( $otherAutoblockLink ) )->parse()
187 foreach ( $otherAutoblockLink as $link ) {
188 $list .= Html::rawElement(
'li', [], $link ) .
"\n";
193 [
'class' =>
'mw-autoblocklist-otherblocks' ],
206class_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 By default the message key is the canonical name of...
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.