From 14b93846c06bd3c4ee5aa08ff06651c561706d98 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 2 Dec 2005 10:41:50 +0000 Subject: [PATCH] reverted fix from 2005/11/23 as it caused trouble in other areas (eg. vfs class) and fixed the problem (cant insert sql-strings/numerical id's) in the insert-function --- phpgwapi/inc/class.egw_db.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.egw_db.inc.php b/phpgwapi/inc/class.egw_db.inc.php index 07d80859b4..7bc3cf085b 100644 --- a/phpgwapi/inc/class.egw_db.inc.php +++ b/phpgwapi/inc/class.egw_db.inc.php @@ -1317,7 +1317,14 @@ } break; } - $data = array_merge($where,$data); // the checked values need to be inserted too, value in data has precedence + // the checked values need to be inserted too, value in data has precedence, also cant insert sql strings (numerical id) + foreach($where as $column => $value) + { + if (!is_numeric($column) && !isset($data[$column])) + { + $data[$column] = $value; + } + } } $inputarr = false; if ($use_prepared_statement && $this->Link_ID->_bindInputArray) // eg. MaxDB