API: Filter lists of IDs before sending them to the database
[lhc/web/wiklou.git] / includes / api / ApiQueryBlocks.php
index 3cd2ace..95f8cda 100644 (file)
@@ -103,7 +103,7 @@ class ApiQueryBlocks extends ApiQueryBase {
                }
 
                if ( isset( $params['ids'] ) ) {
-                       $this->addWhereFld( 'ipb_id', $params['ids'] );
+                       $this->addWhereIDsFld( 'ipblocks', 'ipb_id', $params['ids'] );
                }
                if ( isset( $params['users'] ) ) {
                        $usernames = [];
@@ -187,7 +187,7 @@ class ApiQueryBlocks extends ApiQueryBase {
 
                $restrictions = [];
                if ( $fld_restrictions ) {
-                       $restrictions = $this->getRestrictionData( $res, $params['limit'] );
+                       $restrictions = self::getRestrictionData( $res, $params['limit'] );
                }
 
                $count = 0;