(bug 30352) Add option to BlockList to filter out IP range blocks
authorJohn Du Hart <johnduhart@users.mediawiki.org>
Tue, 23 Aug 2011 18:40:04 +0000 (18:40 +0000)
committerJohn Du Hart <johnduhart@users.mediawiki.org>
Tue, 23 Aug 2011 18:40:04 +0000 (18:40 +0000)
includes/specials/SpecialBlockList.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index a7b99e7..76915df 100644 (file)
@@ -75,6 +75,7 @@ class SpecialBlockList extends SpecialPage {
                                        wfMsg( 'blocklist-userblocks' ) => 'userblocks',
                                        wfMsg( 'blocklist-tempblocks' ) => 'tempblocks',
                                        wfMsg( 'blocklist-addressblocks' ) => 'addressblocks',
+                                       wfMsg( 'blocklist-rangeblocks' ) => 'rangeblocks',
                                ),
                                'flatlist' => true,
                        ),
@@ -142,6 +143,9 @@ class SpecialBlockList extends SpecialPage {
                if( in_array( 'addressblocks', $this->options ) ) {
                        $conds[] = "ipb_user != 0 OR ipb_range_end > ipb_range_start";
                }
+               if( in_array( 'rangeblocks', $this->options ) ) {
+                       $conds[] = "ipb_range_end = ipb_range_start";
+               }
 
                # Check for other blocks, i.e. global/tor blocks
                $otherBlockLink = array();
index 9880f3e..22a153c 100644 (file)
@@ -3084,6 +3084,7 @@ See [[Special:BlockList|IP block list]] to review blocks.',
 'blocklist-userblocks'            => 'Hide account blocks',
 'blocklist-tempblocks'            => 'Hide temporary blocks',
 'blocklist-addressblocks'         => 'Hide single IP blocks',
+'blocklist-rangeblocks'           => 'Hide range blocks',
 'blocklist-timestamp'             => 'Timestamp',
 'blocklist-target'                => 'Target',
 'blocklist-expiry'                => 'Expires',
index 561a99a..2d89268 100644 (file)
@@ -2102,6 +2102,7 @@ $wgMessageStructure = array(
                'blocklist-userblocks',
                'blocklist-tempblocks',
                'blocklist-addressblocks',
+               'blocklist-rangeblocks',
                'blocklist-timestamp',
                'blocklist-target',
                'blocklist-expiry',