Special:BlockList: Option to hide autoblocks
Add a new option to Special:BlockList for hiding autoblocks. Bug: T270623 Change-Id: I7a00a08974b9f8ed8655b516c3b4a19da524d8a1
This commit is contained in:
parent
3503537452
commit
503a2669ae
3 changed files with 7 additions and 0 deletions
|
|
@ -122,6 +122,7 @@ class SpecialBlockList extends SpecialPage {
|
||||||
'options-messages' => [
|
'options-messages' => [
|
||||||
'blocklist-tempblocks' => 'tempblocks',
|
'blocklist-tempblocks' => 'tempblocks',
|
||||||
'blocklist-indefblocks' => 'indefblocks',
|
'blocklist-indefblocks' => 'indefblocks',
|
||||||
|
'blocklist-autoblocks' => 'autoblocks',
|
||||||
'blocklist-userblocks' => 'userblocks',
|
'blocklist-userblocks' => 'userblocks',
|
||||||
'blocklist-addressblocks' => 'addressblocks',
|
'blocklist-addressblocks' => 'addressblocks',
|
||||||
'blocklist-rangeblocks' => 'rangeblocks',
|
'blocklist-rangeblocks' => 'rangeblocks',
|
||||||
|
|
@ -210,6 +211,10 @@ class SpecialBlockList extends SpecialPage {
|
||||||
if ( in_array( 'userblocks', $this->options ) ) {
|
if ( in_array( 'userblocks', $this->options ) ) {
|
||||||
$conds['ipb_user'] = 0;
|
$conds['ipb_user'] = 0;
|
||||||
}
|
}
|
||||||
|
if ( in_array( 'autoblocks', $this->options ) ) {
|
||||||
|
// ipb_parent_block_id = 0 because of T282890
|
||||||
|
$conds[] = "ipb_parent_block_id IS NULL OR ipb_parent_block_id = 0";
|
||||||
|
}
|
||||||
if ( in_array( 'addressblocks', $this->options ) ) {
|
if ( in_array( 'addressblocks', $this->options ) ) {
|
||||||
$conds[] = "ipb_user != 0 OR ipb_range_end > ipb_range_start";
|
$conds[] = "ipb_user != 0 OR ipb_range_end > ipb_range_start";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2762,6 +2762,7 @@
|
||||||
"autoblocklist-otherblocks": "Other {{PLURAL:$1|autoblock|autoblocks}}",
|
"autoblocklist-otherblocks": "Other {{PLURAL:$1|autoblock|autoblocks}}",
|
||||||
"ipblocklist": "Blocked users",
|
"ipblocklist": "Blocked users",
|
||||||
"ipblocklist-legend": "Find a blocked user",
|
"ipblocklist-legend": "Find a blocked user",
|
||||||
|
"blocklist-autoblocks": "Hide autoblocks",
|
||||||
"blocklist-userblocks": "Hide account blocks",
|
"blocklist-userblocks": "Hide account blocks",
|
||||||
"blocklist-tempblocks": "Hide temporary blocks",
|
"blocklist-tempblocks": "Hide temporary blocks",
|
||||||
"blocklist-indefblocks": "Hide indefinite blocks",
|
"blocklist-indefblocks": "Hide indefinite blocks",
|
||||||
|
|
|
||||||
|
|
@ -2982,6 +2982,7 @@
|
||||||
"autoblocklist-otherblocks": "[[File:Special AutoBlockList new.png|thumb|Example]]\nUsed on [[Special:AutoblockList]] as header for other blocks, i.e. from GlobalBlocking or TorBlocks.\n\nParameters:\n* $1 - number of blocks",
|
"autoblocklist-otherblocks": "[[File:Special AutoBlockList new.png|thumb|Example]]\nUsed on [[Special:AutoblockList]] as header for other blocks, i.e. from GlobalBlocking or TorBlocks.\n\nParameters:\n* $1 - number of blocks",
|
||||||
"ipblocklist": "Title of [[Special:Ipblocklist]].",
|
"ipblocklist": "Title of [[Special:Ipblocklist]].",
|
||||||
"ipblocklist-legend": "Used as legend of the form in [[Special:BlockList]].\n\nSee also:\n* {{msg-mw|Ipblocklist-legend}}\n* {{msg-mw|Ipblocklist-submit}}",
|
"ipblocklist-legend": "Used as legend of the form in [[Special:BlockList]].\n\nSee also:\n* {{msg-mw|Ipblocklist-legend}}\n* {{msg-mw|Ipblocklist-submit}}",
|
||||||
|
"blocklist-autoblocks": "Used as the label for the multi-select checkbox in the form on [[Special:BlockList]]. \n{{Related|Blocklist-blocks}}",
|
||||||
"blocklist-userblocks": "Used as the label for the multi-select checkbox in the form on [[Special:BlockList]].\n{{Related|Blocklist-blocks}}",
|
"blocklist-userblocks": "Used as the label for the multi-select checkbox in the form on [[Special:BlockList]].\n{{Related|Blocklist-blocks}}",
|
||||||
"blocklist-tempblocks": "Used as the label for the multi-select checkbox in the form on [[Special:BlockList]].\n{{Related|Blocklist-blocks}}",
|
"blocklist-tempblocks": "Used as the label for the multi-select checkbox in the form on [[Special:BlockList]].\n{{Related|Blocklist-blocks}}",
|
||||||
"blocklist-indefblocks": "Used as the label for the multi-select checkbox in the form on [[Special:BlockList]].\n{{Related|Blocklist-blocks}}",
|
"blocklist-indefblocks": "Used as the label for the multi-select checkbox in the form on [[Special:BlockList]].\n{{Related|Blocklist-blocks}}",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue