Index: trunk/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -1197,7 +1197,11 @@ |
1198 | 1198 | function update( $table, $values, $conds, $fname = 'DatabaseOracle::update', $options = array() ) { |
1199 | 1199 | global $wgContLang; |
1200 | 1200 | |
1201 | | - $table = $this->tableName( $table ); |
| 1201 | + if ( is_array( $table ) ) { |
| 1202 | + $table = implode( ',', array_map( array( $this, 'tableName' ), $table ) ); |
| 1203 | + } else { |
| 1204 | + $table = $this->tableName( $table ); |
| 1205 | + } |
1202 | 1206 | $opts = $this->makeUpdateOptions( $options ); |
1203 | 1207 | $sql = "UPDATE $opts $table SET "; |
1204 | 1208 | |
Index: trunk/phase3/includes/db/DatabaseIbm_db2.php |
— | — | @@ -984,7 +984,11 @@ |
985 | 985 | public function update( $table, $values, $conds, $fname = 'DatabaseIbm_db2::update', |
986 | 986 | $options = array() ) |
987 | 987 | { |
988 | | - $table = $this->tableName( $table ); |
| 988 | + if ( is_array( $table ) ) { |
| 989 | + $table = implode( ',', array_map( array( $this, 'tableName' ), $table ) ); |
| 990 | + } else { |
| 991 | + $table = $this->tableName( $table ); |
| 992 | + } |
989 | 993 | $opts = $this->makeUpdateOptions( $options ); |
990 | 994 | $sql = "UPDATE $opts $table SET " |
991 | 995 | . $this->makeList( $values, LIST_SET_PREPARED ); |
Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -1683,28 +1683,32 @@ |
1684 | 1684 | /** |
1685 | 1685 | * UPDATE wrapper. Takes a condition array and a SET array. |
1686 | 1686 | * |
1687 | | - * @param $table String name of the table to UPDATE. This will be passed through |
| 1687 | + * @param $table String|array name of the table to UPDATE. This will be passed through |
1688 | 1688 | * DatabaseBase::tableName(). |
1689 | 1689 | * |
1690 | | - * @param $values Array: An array of values to SET. For each array element, |
| 1690 | + * @param $values Array An array of values to SET. For each array element, |
1691 | 1691 | * the key gives the field name, and the value gives the data |
1692 | 1692 | * to set that field to. The data will be quoted by |
1693 | 1693 | * DatabaseBase::addQuotes(). |
1694 | 1694 | * |
1695 | | - * @param $conds Array: An array of conditions (WHERE). See |
| 1695 | + * @param $conds Array An array of conditions (WHERE). See |
1696 | 1696 | * DatabaseBase::select() for the details of the format of |
1697 | 1697 | * condition arrays. Use '*' to update all rows. |
1698 | 1698 | * |
1699 | | - * @param $fname String: The function name of the caller (from __METHOD__), |
| 1699 | + * @param $fname String The function name of the caller (from __METHOD__), |
1700 | 1700 | * for logging and profiling. |
1701 | 1701 | * |
1702 | | - * @param $options Array: An array of UPDATE options, can be: |
| 1702 | + * @param $options Array An array of UPDATE options, can be: |
1703 | 1703 | * - IGNORE: Ignore unique key conflicts |
1704 | 1704 | * - LOW_PRIORITY: MySQL-specific, see MySQL manual. |
1705 | 1705 | * @return Boolean |
1706 | 1706 | */ |
1707 | 1707 | function update( $table, $values, $conds, $fname = 'DatabaseBase::update', $options = array() ) { |
1708 | | - $table = $this->tableName( $table ); |
| 1708 | + if ( is_array( $table ) ) { |
| 1709 | + $table = implode( ',', array_map( array( $this, 'tableName' ), $table ) ); |
| 1710 | + } else { |
| 1711 | + $table = $this->tableName( $table ); |
| 1712 | + } |
1709 | 1713 | $opts = $this->makeUpdateOptions( $options ); |
1710 | 1714 | $sql = "UPDATE $opts $table SET " . $this->makeList( $values, LIST_SET ); |
1711 | 1715 | |