Index: trunk/phase3/includes/api/ApiQueryBlocks.php |
— | — | @@ -148,8 +148,8 @@ |
149 | 149 | $block['reason'] = $row->ipb_reason; |
150 | 150 | if($fld_range) |
151 | 151 | { |
152 | | - $block['rangestart'] = IP::hexToIP($row->ipb_range_start); |
153 | | - $block['rangeend'] = IP::hexToIP($row->ipb_range_end); |
| 152 | + $block['rangestart'] = IP::hexToQuad($row->ipb_range_start); |
| 153 | + $block['rangeend'] = IP::hexToQuad($row->ipb_range_end); |
154 | 154 | } |
155 | 155 | if($fld_flags) |
156 | 156 | { |
Index: trunk/phase3/includes/IP.php |
— | — | @@ -152,7 +152,7 @@ |
153 | 153 | } |
154 | 154 | |
155 | 155 | /** |
156 | | - * Given an unsigned integer, returns an IPv6 address in octet notation |
| 156 | + * Given a hexadecimal number, returns to an IPv6 address in octet notation |
157 | 157 | * @param $ip string hex IP |
158 | 158 | * @return string |
159 | 159 | */ |
— | — | @@ -174,7 +174,7 @@ |
175 | 175 | * @param $ip string Hex IP |
176 | 176 | * @return string |
177 | 177 | */ |
178 | | - public static function hexToIP( $ip ) { |
| 178 | + public static function hexToQuad( $ip ) { |
179 | 179 | // Converts a hexadecimal IP to nnn.nnn.nnn.nnn format |
180 | 180 | $dec = wfBaseConvert( $ip, 16, 10 ); |
181 | 181 | $parts[3] = $dec % 256; |
Index: trunk/extensions/GlobalBlocking/ApiQueryGlobalBlocks.php |
— | — | @@ -129,8 +129,8 @@ |
130 | 130 | $block['reason'] = $row->gb_reason; |
131 | 131 | if($fld_range) |
132 | 132 | { |
133 | | - $block['rangestart'] = IP::hexToIP($row->gb_range_start); |
134 | | - $block['rangeend'] = IP::hexToIP($row->gb_range_end); |
| 133 | + $block['rangestart'] = IP::hexToQuad($row->gb_range_start); |
| 134 | + $block['rangeend'] = IP::hexToQuad($row->gb_range_end); |
135 | 135 | } |
136 | 136 | $data[] = $block; |
137 | 137 | } |