r95319 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95318‎ | r95319 | r95320 >
Date:18:40, 23 August 2011
Author:johnduhart
Status:ok (Comments)
Tags:
Comment:
(bug 30352) Add option to BlockList to filter out IP range blocks
Modified paths:
  • /trunk/phase3/includes/specials/SpecialBlockList.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -2102,6 +2102,7 @@
21032103 'blocklist-userblocks',
21042104 'blocklist-tempblocks',
21052105 'blocklist-addressblocks',
 2106+ 'blocklist-rangeblocks',
21062107 'blocklist-timestamp',
21072108 'blocklist-target',
21082109 'blocklist-expiry',
Index: trunk/phase3/includes/specials/SpecialBlockList.php
@@ -75,6 +75,7 @@
7676 wfMsg( 'blocklist-userblocks' ) => 'userblocks',
7777 wfMsg( 'blocklist-tempblocks' ) => 'tempblocks',
7878 wfMsg( 'blocklist-addressblocks' ) => 'addressblocks',
 79+ wfMsg( 'blocklist-rangeblocks' ) => 'rangeblocks',
7980 ),
8081 'flatlist' => true,
8182 ),
@@ -142,6 +143,9 @@
143144 if( in_array( 'addressblocks', $this->options ) ) {
144145 $conds[] = "ipb_user != 0 OR ipb_range_end > ipb_range_start";
145146 }
 147+ if( in_array( 'rangeblocks', $this->options ) ) {
 148+ $conds[] = "ipb_range_end = ipb_range_start";
 149+ }
146150
147151 # Check for other blocks, i.e. global/tor blocks
148152 $otherBlockLink = array();
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -3084,6 +3084,7 @@
30853085 'blocklist-userblocks' => 'Hide account blocks',
30863086 'blocklist-tempblocks' => 'Hide temporary blocks',
30873087 'blocklist-addressblocks' => 'Hide single IP blocks',
 3088+'blocklist-rangeblocks' => 'Hide range blocks',
30883089 'blocklist-timestamp' => 'Timestamp',
30893090 'blocklist-target' => 'Target',
30903091 'blocklist-expiry' => 'Expires',

Comments

#Comment by Johnduhart (talk | contribs)   18:41, 23 August 2011

Gah I'm sorry that should be bug 30351

Status & tagging log