78 parent::__construct(
'AutoblockList' );
80 $this->linkBatchFactory = $linkBatchFactory;
81 $this->blockRestrictionStore = $blockRestrictionStore;
82 $this->dbProvider = $dbProvider;
83 $this->commentStore = $commentStore;
84 $this->blockUtils = $blockUtils;
85 $this->hideUserUtils = $hideUserUtils;
86 $this->blockActionInfo = $blockActionInfo;
87 $this->rowCommentFormatter = $rowCommentFormatter;
97 $out->setPageTitleMsg( $this->
msg(
'autoblocklist' ) );
99 $out->addModuleStyles( [
'mediawiki.special' ] );
101 # setup BlockListPager here to get the actual default Limit
104 # Just show the block list
107 'type' =>
'limitselect',
108 'label-message' =>
'table_pager_limit_label',
109 'options' => $pager->getLimitSelectList(),
111 'default' => $pager->getLimit(),
115 $form = HTMLForm::factory(
'ooui', $fields, $this->
getContext() );
116 $form->setMethod(
'get' )
118 ->setFormIdentifier(
'blocklist' )
119 ->setWrapperLegendMsg(
'autoblocklist-legend' )
120 ->setSubmitTextMsg(
'autoblocklist-submit' )
122 ->displayForm(
false );
136 'ipb_parent_block_id IS NOT NULL',
138 'ipb_parent_block_id <> 0',
140 # Is the user allowed to see hidden blocks?
141 if ( !$this->
getAuthority()->isAllowed(
'hideuser' ) ) {
142 $conds[
'ipb_deleted'] = 0;
146 'bl_parent_block_id IS NOT NULL',
148 # Is the user allowed to see hidden blocks?
149 if ( !$this->
getAuthority()->isAllowed(
'hideuser' ) ) {
150 $conds[
'bl_deleted'] = 0;
154 '$wgBlockTargetMigrationStage has an invalid read stage' );
159 $this->blockActionInfo,
160 $this->blockRestrictionStore,
162 $this->hideUserUtils,
164 $this->linkBatchFactory,
167 $this->rowCommentFormatter,
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' ],
228class_alias( SpecialAutoblockList::class,
'SpecialAutoblockList' );
const SCHEMA_COMPAT_READ_NEW
const SCHEMA_COMPAT_READ_OLD
const SCHEMA_COMPAT_READ_MASK
A class containing constants representing the names of configuration variables.
const BlockTargetMigrationStage
Name constant for the BlockTargetMigrationStage setting, for use with Config::get()
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.
getConfig()
Shortcut to get main config 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.