From 1cded85790206afe084e1baff371c543711b2b18 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Sat, 03 Dec 2005 11:54:12 -0500 Subject: [PATCH] Re-design of caching (new database table added\!); some bugfixes; Postgres support --- program/steps/mail/addcontact.inc | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/program/steps/mail/addcontact.inc b/program/steps/mail/addcontact.inc index ad1544e..b1129ec 100644 --- a/program/steps/mail/addcontact.inc +++ b/program/steps/mail/addcontact.inc @@ -32,7 +32,7 @@ $sql_result = $DB->query("SELECT 1 FROM ".get_table_name('contacts')." WHERE user_id=? AND email=? - AND del<>'1'", + AND del<>1", $_SESSION['user_id'],$contact['mailto']); // contact entry with this mail address exists @@ -42,13 +42,13 @@ else if ($contact['mailto']) { $DB->query("INSERT INTO ".get_table_name('contacts')." - (user_id, changed, name, email) - VALUES (?, now(), ?, ?)", + (user_id, changed, del, name, email) + VALUES (?, now(), 0, ?, ?)", $_SESSION['user_id'], $contact['name'], $contact['mailto']); - $added = $DB->insert_id(); + $added = $DB->insert_id(get_sequence_name('contacts')); } } -- Gitblit v1.9.1