From: Sam Reed Date: Fri, 2 Dec 2011 00:29:46 +0000 (+0000) Subject: Reverting r103706 X-Git-Tag: 1.31.0-rc.0~26197 X-Git-Url: http://git.cyclocoop.org/%24dirpuce/puce%24spip_lang_rtl.gif?a=commitdiff_plain;h=bf62deece8beeb36c5b553d5b0594be335839013;p=lhc%2Fweb%2Fwiklou.git Reverting r103706 Only seemingly supported by MySQL, and likely a seldom used function Not worth trying to support it, as other non mysql db's would need workarounds, and that's just not happening --- diff --git a/includes/db/Database.php b/includes/db/Database.php index 93dd63239a..6945cebbb2 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1697,32 +1697,28 @@ abstract class DatabaseBase implements DatabaseType { /** * UPDATE wrapper. Takes a condition array and a SET array. * - * @param $table String|array name of the table to UPDATE. This will be passed through + * @param $table String name of the table to UPDATE. This will be passed through * DatabaseBase::tableName(). * - * @param $values Array An array of values to SET. For each array element, + * @param $values Array: An array of values to SET. For each array element, * the key gives the field name, and the value gives the data * to set that field to. The data will be quoted by * DatabaseBase::addQuotes(). * - * @param $conds Array An array of conditions (WHERE). See + * @param $conds Array: An array of conditions (WHERE). See * DatabaseBase::select() for the details of the format of * condition arrays. Use '*' to update all rows. * - * @param $fname String The function name of the caller (from __METHOD__), + * @param $fname String: The function name of the caller (from __METHOD__), * for logging and profiling. * - * @param $options Array An array of UPDATE options, can be: + * @param $options Array: An array of UPDATE options, can be: * - IGNORE: Ignore unique key conflicts * - LOW_PRIORITY: MySQL-specific, see MySQL manual. * @return Boolean */ function update( $table, $values, $conds, $fname = 'DatabaseBase::update', $options = array() ) { - if ( is_array( $table ) ) { - $table = implode( ',', array_map( array( $this, 'tableName' ), $table ) ); - } else { - $table = $this->tableName( $table ); - } + $table = $this->tableName( $table ); $opts = $this->makeUpdateOptions( $options ); $sql = "UPDATE $opts $table SET " . $this->makeList( $values, LIST_SET ); diff --git a/includes/db/DatabaseIbm_db2.php b/includes/db/DatabaseIbm_db2.php index eb91478012..67ca80a4ae 100644 --- a/includes/db/DatabaseIbm_db2.php +++ b/includes/db/DatabaseIbm_db2.php @@ -984,11 +984,7 @@ class DatabaseIbm_db2 extends DatabaseBase { public function update( $table, $values, $conds, $fname = 'DatabaseIbm_db2::update', $options = array() ) { - if ( is_array( $table ) ) { - $table = implode( ',', array_map( array( $this, 'tableName' ), $table ) ); - } else { - $table = $this->tableName( $table ); - } + $table = $this->tableName( $table ); $opts = $this->makeUpdateOptions( $options ); $sql = "UPDATE $opts $table SET " . $this->makeList( $values, LIST_SET_PREPARED ); diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index d807201edd..664e7da609 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -1197,11 +1197,7 @@ class DatabaseOracle extends DatabaseBase { function update( $table, $values, $conds, $fname = 'DatabaseOracle::update', $options = array() ) { global $wgContLang; - if ( is_array( $table ) ) { - $table = implode( ',', array_map( array( $this, 'tableName' ), $table ) ); - } else { - $table = $this->tableName( $table ); - } + $table = $this->tableName( $table ); $opts = $this->makeUpdateOptions( $options ); $sql = "UPDATE $opts $table SET ";