Index: trunk/phase3/includes/api/ApiQueryBase.php |
— | — | @@ -251,18 +251,12 @@ |
252 | 252 | * @return ResultWrapper |
253 | 253 | */ |
254 | 254 | protected function select( $method, $extraQuery = array() ) { |
255 | | - $tables = $this->tables; |
256 | | - $fields = $this->fields; |
257 | | - $where = $this->where; |
258 | | - $options = $this->options; |
259 | | - $join_conds = $this->join_conds; |
260 | 255 | |
261 | | - // Merge $this->tables with $extraQuery['tables'], $this->fields with $extraQuery['fields'], etc. |
262 | | - foreach ( array( 'tables', 'fields', 'where', 'options', 'join_conds' ) as $var ) { |
263 | | - if ( isset( $extraQuery[$var] ) ) { |
264 | | - $$var = array_merge( $$var, (array)$extraQuery[$var] ); |
265 | | - } |
266 | | - } |
| 256 | + $tables = array_merge( $this->tables, isset( $extraQuery['tables'] ) ? (array)$extraQuery['tables'] : array() ); |
| 257 | + $fields = array_merge( $this->fields, isset( $extraQuery['fields'] ) ? (array)$extraQuery['fields'] : array() ); |
| 258 | + $where = array_merge( $this->where, isset( $extraQuery['where'] ) ? (array)$extraQuery['where'] : array() ); |
| 259 | + $options = array_merge( $this->options, isset( $extraQuery['options'] ) ? (array)$extraQuery['options'] : array() ); |
| 260 | + $join_conds = array_merge( $this->join_conds, isset( $extraQuery['join_conds'] ) ? (array)$extraQuery['join_conds'] : array() ); |
267 | 261 | |
268 | 262 | // getDB has its own profileDBIn/Out calls |
269 | 263 | $db = $this->getDB(); |