diff options
author | thomascube <thomas@roundcube.net> | 2005-12-03 16:54:12 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2005-12-03 16:54:12 +0000 |
commit | 1cded85790206afe084e1baff371c543711b2b18 (patch) | |
tree | b050fb89707e048df5f30f500faad792962a1e81 /program/steps/addressbook/save.inc | |
parent | 5bc8cb662fc3bcda9aa641b7a5e88c0b81dd63d6 (diff) |
Re-design of caching (new database table added\!); some bugfixes; Postgres support
Diffstat (limited to 'program/steps/addressbook/save.inc')
-rw-r--r-- | program/steps/addressbook/save.inc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc index 2f54e435b..f5ba139b9 100644 --- a/program/steps/addressbook/save.inc +++ b/program/steps/addressbook/save.inc @@ -52,7 +52,7 @@ if ($_POST['_cid']) SET changed=now(), ".join(', ', $a_write_sql)." WHERE contact_id=? AND user_id=? - AND del<>'1'", + AND del<>1", $_POST['_cid'], $_SESSION['user_id']); @@ -73,7 +73,7 @@ if ($_POST['_cid']) $sql_result = $DB->query("SELECT * FROM ".get_table_name('contacts')." WHERE contact_id=? AND user_id=? - AND del<>'1'", + AND del<>1", $_POST['_cid'], $_SESSION['user_id']); @@ -109,7 +109,7 @@ else $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'], $_POST['_email']); @@ -134,11 +134,11 @@ else if (sizeof($a_insert_cols)) { $DB->query("INSERT INTO ".get_table_name('contacts')." - (user_id, changed, ".join(', ', $a_insert_cols).") - VALUES (?, now(), ".join(', ', $a_insert_values).")", + (user_id, changed, del, ".join(', ', $a_insert_cols).") + VALUES (?, now(), 0, ".join(', ', $a_insert_values).")", $_SESSION['user_id']); - $insert_id = $DB->insert_id(); + $insert_id = $DB->insert_id(get_sequence_name('contacts')); } if ($insert_id) |