- for ( $from = 1; $from <= $max; $from += $this->mBatchSize ) {
- $to = min( $max, $from + $this->mBatchSize - 1 );
+ $batchSize = $this->getBatchSize();
+ for ( $from = 1; $from <= $max; $from += $batchSize ) {
+ $to = min( $max, $from + $batchSize - 1 );