Index: trunk/phase3/includes/db/DatabaseMysql.php |
— | — | @@ -364,21 +364,18 @@ |
365 | 365 | * @param $table String: table name (prefix auto-added) |
366 | 366 | * @param $a Array: Array of rows to insert |
367 | 367 | * @param $fname String: Calling function name (use __METHOD__) for logs/profiling |
368 | | - * @param $options Mixed: Associative array of options |
369 | 368 | * @param $onDupeUpdate Array: Associative array of fields to update on duplicate |
370 | 369 | * |
371 | 370 | * @return bool |
372 | 371 | */ |
373 | | - function insertOrUpdate( $table, $a, $fname = 'DatabaseBase::insertOrUpdate', $options = array(), $onDupeUpdate = array() ) { |
| 372 | + function insertOrUpdate( $table, $a, $fname = 'DatabaseBase::insertOrUpdate', $onDupeUpdate = array() ) { |
374 | 373 | # No rows to insert, easy just return now |
375 | 374 | if ( !count( $a ) ) { |
376 | 375 | return true; |
377 | 376 | } |
378 | 377 | |
379 | 378 | $table = $this->tableName( $table ); |
380 | | - if ( !is_array( $options ) ) { |
381 | | - $options = array( $options ); |
382 | | - } |
| 379 | + |
383 | 380 | if ( isset( $a[0] ) && is_array( $a[0] ) ) { |
384 | 381 | $multi = true; |
385 | 382 | $keys = array_keys( $a[0] ); |
— | — | @@ -387,8 +384,7 @@ |
388 | 385 | $keys = array_keys( $a ); |
389 | 386 | } |
390 | 387 | |
391 | | - $sql = 'INSERT ' . implode( ' ', $options ) . |
392 | | - " INTO $table (" . implode( ',', $keys ) . ') VALUES '; |
| 388 | + $sql = "INSERT INTO $table (" . implode( ',', $keys ) . ') VALUES '; |
393 | 389 | |
394 | 390 | if ( $multi ) { |
395 | 391 | $first = true; |
Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -1164,12 +1164,11 @@ |
1165 | 1165 | * @param $table String: table name (prefix auto-added) |
1166 | 1166 | * @param $a Array: Array of rows to insert |
1167 | 1167 | * @param $fname String: Calling function name (use __METHOD__) for logs/profiling |
1168 | | - * @param $options Mixed: Associative array of options (ignored in this implementation) |
1169 | 1168 | * @param $onDupeUpdate Array: Associative array of fields to update on duplicate |
1170 | 1169 | * |
1171 | 1170 | * @return bool |
1172 | 1171 | */ |
1173 | | - function insertOrUpdate( $table, $a, $fname = 'DatabaseBase::insertOrUpdate', $options = array(), $onDupeUpdate = array() ) { |
| 1172 | + function insertOrUpdate( $table, $a, $fname = 'DatabaseBase::insertOrUpdate', $onDupeUpdate = array() ) { |
1174 | 1173 | |
1175 | 1174 | if ( isset( $a[0] ) && is_array( $a[0] ) ) { |
1176 | 1175 | $keys = array_keys( $a[0] ); |