summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-07-20 11:32:01 +0000
committeralecpl <alec@alec.pl>2009-07-20 11:32:01 +0000
commit4307ccd82b259e22d65a9468b71cfe5786a456de (patch)
treedaa73d95b14e22eb3ecb0484c399cf897045c1cf /program/include
parent6955c70f286dee3d003736c911ad9d3203b0be6c (diff)
- prevent PREPARE error on postgres when inserting non-Unicode characters
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_contacts.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/program/include/rcube_contacts.php b/program/include/rcube_contacts.php
index 7b6a2c4cf..e85c865f2 100644
--- a/program/include/rcube_contacts.php
+++ b/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;
}