diff --git a/program/lib/Roundcube/db/mysql.php b/program/lib/Roundcube/db/mysql.php index aad6911ff..c9d5095c7 100644 --- a/program/lib/Roundcube/db/mysql.php +++ b/program/lib/Roundcube/db/mysql.php @@ -224,7 +224,7 @@ class rcube_db_mysql extends rcube_db * INSERT ... ON DUPLICATE KEY UPDATE (or equivalent). * When not supported by the engine we do UPDATE and INSERT. * - * @param string $table Table name + * @param string $table Table name (should be already passed via table_name() with quoting) * @param array $keys Hash array (column => value) of the unique constraint * @param array $columns List of columns to update * @param array $values List of values to update (number of elements @@ -235,7 +235,6 @@ class rcube_db_mysql extends rcube_db */ public function insert_or_update($table, $keys, $columns, $values) { - $table = $this->table_name($table, true); $columns = array_map(function($i) { return "`$i`"; }, $columns); $cols = implode(', ', array_map(function($i) { return "`$i`"; }, array_keys($keys))); $cols .= ', ' . implode(', ', $columns); diff --git a/program/lib/Roundcube/db/pgsql.php b/program/lib/Roundcube/db/pgsql.php index 8c66991c3..f8822dc18 100644 --- a/program/lib/Roundcube/db/pgsql.php +++ b/program/lib/Roundcube/db/pgsql.php @@ -195,7 +195,7 @@ class rcube_db_pgsql extends rcube_db * INSERT ... ON CONFLICT DO UPDATE. * When not supported by the engine we do UPDATE and INSERT. * - * @param string $table Table name + * @param string $table Table name (should be already passed via table_name() with quoting) * @param array $keys Hash array (column => value) of the unique constraint * @param array $columns List of columns to update * @param array $values List of values to update (number of elements @@ -211,7 +211,6 @@ class rcube_db_pgsql extends rcube_db return parent::insert_or_update($table, $keys, $columns, $values); } - $table = $this->table_name($table, true); $columns = array_map([$this, 'quote_identifier'], $columns); $target = implode(', ', array_map([$this, 'quote_identifier'], array_keys($keys))); $cols = $target . ', ' . implode(', ', $columns); diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php index 2ec03b479..284bb4bdd 100644 --- a/program/lib/Roundcube/rcube_db.php +++ b/program/lib/Roundcube/rcube_db.php @@ -576,7 +576,7 @@ class rcube_db * INSERT ... ON DUPLICATE KEY UPDATE (or equivalent). * When not supported by the engine we do UPDATE and INSERT. * - * @param string $table Table name + * @param string $table Table name (should be already passed via table_name() with quoting) * @param array $keys Hash array (column => value) of the unique constraint * @param array $columns List of columns to update * @param array $values List of values to update (number of elements @@ -587,7 +587,6 @@ class rcube_db */ public function insert_or_update($table, $keys, $columns, $values) { - $table = $this->table_name($table, true); $columns = array_map(function($i) { return "`$i`"; }, $columns); $sets = array_map(function($i) { return "$i = ?"; }, $columns); $where = $keys;