Index: branches/wmf/1.19wmf1/includes/api/ApiQueryBlocks.php |
— | — | @@ -87,6 +87,7 @@ |
88 | 88 | $this->addWhereFld( 'ipb_address', $this->usernames ); |
89 | 89 | $this->addWhereFld( 'ipb_auto', 0 ); |
90 | 90 | } |
| 91 | + $db = $this->getDB(); |
91 | 92 | if ( isset( $params['ip'] ) ) { |
92 | 93 | list( $ip, $range ) = IP::parseCIDR( $params['ip'] ); |
93 | 94 | if ( $ip && $range ) { |
— | — | @@ -100,7 +101,6 @@ |
101 | 102 | } |
102 | 103 | $prefix = substr( $lower, 0, 4 ); |
103 | 104 | |
104 | | - $db = $this->getDB(); |
105 | 105 | $this->addWhere( array( |
106 | 106 | 'ipb_range_start' . $db->buildLike( $prefix, $db->anyString() ), |
107 | 107 | "ipb_range_start <= '$lower'", |