From def1dbbf35ac174fec344511dee49d3529c423bf Mon Sep 17 00:00:00 2001 From: Daniel Cannon Date: Sun, 18 Nov 2007 06:02:36 +0000 Subject: [PATCH] Provide a unique message (ipb_blocked_as_range) if unblock of a single IP fails because it is part of a blocked range. --- RELEASE-NOTES | 2 ++ includes/SpecialIpblocklist.php | 4 +++- languages/messages/MessagesEn.php | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9b814c5a49..95fd681b06 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -64,6 +64,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN [[MediaWiki:Signature-anon]] * Signatures for anonymous users link to Special:Contributions page rather than user page * Added --override switch for disabled pages in updateSpecialPages.php +* Provide a unique message (ipb_blocked_as_range) if unblock of a single IP fails + because it is part of a blocked range. === Bug fixes in 1.12 === diff --git a/includes/SpecialIpblocklist.php b/includes/SpecialIpblocklist.php index 6edbd7abe4..ab2b61d8df 100644 --- a/includes/SpecialIpblocklist.php +++ b/includes/SpecialIpblocklist.php @@ -163,7 +163,9 @@ class IPUnblockForm { && !strstr ( $this->ip, "/" ) ) { /* If the specified IP is a single address, and the block is * a range block, don't unblock the range. */ - $block = null; + + $this->showForm ( wfMsg ( 'ipb_blocked_as_range', $this->ip, $block->mAddress ) ); + return; } } } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 1ba304d2e5..4c314ac5f8 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2091,6 +2091,7 @@ the list of currently operational bans and blocks.', 'ipb_expiry_invalid' => 'Expiry time invalid.', 'ipb_already_blocked' => '"$1" is already blocked', 'ipb_cant_unblock' => 'Error: Block ID $1 not found. It may have been unblocked already.', +'ipb_blocked_as_range' => 'Error: The IP $1 is not blocked directly and cannot be unblocked. It is, however, blocked as part of the range $2, which can be unblocked.', 'ip_range_invalid' => 'Invalid IP range.', 'blockme' => 'Block me', 'proxyblocker' => 'Proxy blocker', -- 2.20.1