From e00fb51c3d14a9343d8ef7e4f912b7ad03102ab2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerg=C5=91=20Tisza?= Date: Thu, 31 Dec 2015 12:24:39 -0800 Subject: [PATCH] Add largest allowed range as parameter to block form message Change-Id: I17bcd5de01bb301193d849ec060fc3b5be6b14ab --- includes/specials/SpecialBlock.php | 3 ++- languages/i18n/en.json | 2 +- languages/i18n/qqq.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index e125d9441d..b7f5e49b0d 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -321,7 +321,8 @@ class SpecialBlock extends FormSpecialPage { protected function preText() { $this->getOutput()->addModules( array( 'mediawiki.special.block', 'mediawiki.userSuggest' ) ); - $text = $this->msg( 'blockiptext' )->parse(); + $blockCIDRLimit = $this->getConfig()->get( 'BlockCIDRLimit' ); + $text = $this->msg( 'blockiptext', $blockCIDRLimit['IPv4'], $blockCIDRLimit['IPv6'] )->parse(); $otherBlockMessages = array(); if ( $this->target !== null ) { diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 0c72d7760c..9da9db138a 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -2196,7 +2196,7 @@ "unblock-summary": "", "blockip": "Block {{GENDER:$1|user}}", "blockip-legend": "Block user", - "blockiptext": "Use the form below to block write access from a specific IP address or username.\nThis should be done only to prevent vandalism, and in accordance with [[{{MediaWiki:Policy-url}}|policy]].\nFill in a specific reason below (for example, citing particular pages that were vandalized).", + "blockiptext": "Use the form below to block write access from a specific IP address or username.\nThis should be done only to prevent vandalism, and in accordance with [[{{MediaWiki:Policy-url}}|policy]].\nFill in a specific reason below (for example, citing particular pages that were vandalized).\nYou can block IP ranges using the [https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing CIDR] syntax; the largest allowed range is /$1 for IPv4 and /$2 for IPv6.", "ipaddressorusername": "IP address or username:", "ipbexpiry": "Expiry:", "ipbreason": "Reason:", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 329e901963..a1347256e1 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -2371,7 +2371,7 @@ "unblock-summary": "{{doc-specialpagesummary|unblock}}", "blockip": "Used as the text of a link in the sidebar toolbox. Clicking this link takes you to [[Special:Block]], with a relevant username or IP address (e.g. \"Username\" on [[User talk:Username]], [[Special:Contributions/Username]], etc.) already filled in.\n\nParameters:\n* $1 - username, for GENDER support\n{{Identical|Block user}}", "blockip-legend": "Legend/Header for the fieldset around the input form of [[Special:Block]].\n\n{{Identical|Block user}}", - "blockiptext": "Used in the {{msg-mw|Blockip}} form in [[Special:Block]].\n\nRefers to {{msg-mw|Policy-url}}.\n\nThis message may follow the message {{msg-mw|Ipb-otherblocks-header}} and other block messages.\n\nSee also:\n* {{msg-mw|Unblockiptext}}", + "blockiptext": "Used in the {{msg-mw|Blockip}} form in [[Special:Block]].\n\nRefers to {{msg-mw|Policy-url}}.\n\nThis message may follow the message {{msg-mw|Ipb-otherblocks-header}} and other block messages.\n\nParameters:\n* $1 - CIDR suffix of the largest allowed IPv4 block (as an integer)\n* $2 - CIDR suffix of the largest allowed IPv6 block (as an integer)\n\nSee also:\n* {{msg-mw|Unblockiptext}}", "ipaddressorusername": "{{Identical|IP address or username}}", "ipbexpiry": "{{Identical|Expiry}}", "ipbreason": "Label of the block reason dropdown in [[Special:BlockIP]] and the unblock reason textfield in [{{fullurl:Special:IPBlockList|action=unblock}} Special:IPBlockList?action=unblock].\n\n{{Identical|Reason}}", -- 2.20.1