diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-07-20 11:32:01 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-07-20 11:32:01 +0000 |
| commit | d98ea04526702d3b310810df965bd18be27338d6 (patch) | |
| tree | f5ded848bb0acda1b2b5086980ba3ec8e33af947 /roundcubemail/program/include | |
| parent | e47192e40dee5544cec3de588cb340a16cae25b1 (diff) | |
- prevent PREPARE error on postgres when inserting non-Unicode characters
git-svn-id: https://svn.roundcube.net/trunk@2773 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcube_contacts.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/roundcubemail/program/include/rcube_contacts.php b/roundcubemail/program/include/rcube_contacts.php index 7b6a2c4cf..e85c865f2 100644 --- a/roundcubemail/program/include/rcube_contacts.php +++ b/roundcubemail/program/include/rcube_contacts.php @@ -262,18 +262,18 @@ class rcube_contacts extends rcube_addressbook $a_insert_cols[] = $this->db->quoteIdentifier($col); $a_insert_values[] = $this->db->quote($save_data[$col]); } - + if (!$existing->count && !empty($a_insert_cols)) { $this->db->query( "INSERT INTO ".$this->db_name." (user_id, changed, del, ".join(', ', $a_insert_cols).") - VALUES (?, ".$this->db->now().", 0, ".join(', ', $a_insert_values).")", - $this->user_id); + VALUES (".intval($this->user_id).", ".$this->db->now().", 0, ".join(', ', $a_insert_values).")" + ); $insert_id = $this->db->insert_id(get_sequence_name('contacts')); } - + return $insert_id; } |
