diff options
Diffstat (limited to 'program/steps/addressbook')
-rw-r--r-- | program/steps/addressbook/delete.inc | 6 | ||||
-rw-r--r-- | program/steps/addressbook/edit.inc | 2 | ||||
-rw-r--r-- | program/steps/addressbook/func.inc | 6 | ||||
-rw-r--r-- | program/steps/addressbook/list.inc | 4 | ||||
-rw-r--r-- | program/steps/addressbook/save.inc | 12 | ||||
-rw-r--r-- | program/steps/addressbook/show.inc | 2 |
6 files changed, 16 insertions, 16 deletions
diff --git a/program/steps/addressbook/delete.inc b/program/steps/addressbook/delete.inc index a3fcefbf7..b95988d12 100644 --- a/program/steps/addressbook/delete.inc +++ b/program/steps/addressbook/delete.inc @@ -24,7 +24,7 @@ $REMOTE_REQUEST = TRUE; if ($_GET['_cid']) { $DB->query("UPDATE ".get_table_name('contacts')." - SET del='1' + SET del=1 WHERE user_id=? AND contact_id IN (".$_GET['_cid'].")", $_SESSION['user_id']); @@ -40,7 +40,7 @@ if ($_GET['_cid']) // count contacts for this user $sql_result = $DB->query("SELECT COUNT(contact_id) AS rows FROM ".get_table_name('contacts')." - WHERE del<>'1' + WHERE del<>1 AND user_id=?", $_SESSION['user_id']); @@ -60,7 +60,7 @@ if ($_GET['_cid']) // get contacts from DB $sql_result = $DB->limitquery("SELECT * FROM ".get_table_name('contacts')." - WHERE del<>'1' + WHERE del<>1 AND user_id=? ORDER BY name", $start_row, diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc index feb794f4d..a129d0094 100644 --- a/program/steps/addressbook/edit.inc +++ b/program/steps/addressbook/edit.inc @@ -26,7 +26,7 @@ if (($_GET['_cid'] || $_POST['_cid']) && $_action=='edit') $DB->query("SELECT * FROM ".get_table_name('contacts')." WHERE contact_id=? AND user_id=? - AND del<>'1'", + AND del<>1", $cid, $_SESSION['user_id']); diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index 4cc79bad6..8065219b0 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -43,7 +43,7 @@ function rcmail_contacts_list($attrib) // count contacts for this user $sql_result = $DB->query("SELECT COUNT(contact_id) AS rows FROM ".get_table_name('contacts')." - WHERE del<>'1' + WHERE del<>1 AND user_id=?", $_SESSION['user_id']); @@ -56,7 +56,7 @@ function rcmail_contacts_list($attrib) // get contacts from DB $sql_result = $DB->limitquery("SELECT * FROM ".get_table_name('contacts')." - WHERE del<>'1' + WHERE del<>1 AND user_id= ? ORDER BY name", $start_row, @@ -173,7 +173,7 @@ function rcmail_get_rowcount_text($max=NULL) if ($max===NULL) { $sql_result = $DB->query("SELECT 1 FROM ".get_table_name('contacts')." - WHERE del<>'1' + WHERE del<>1 AND user_id=?", $_SESSION['user_id']); diff --git a/program/steps/addressbook/list.inc b/program/steps/addressbook/list.inc index ecb634b6f..0aa4873b3 100644 --- a/program/steps/addressbook/list.inc +++ b/program/steps/addressbook/list.inc @@ -24,7 +24,7 @@ $REMOTE_REQUEST = TRUE; // count contacts for this user $sql_result = $DB->query("SELECT COUNT(contact_id) AS rows FROM ".get_table_name('contacts')." - WHERE del<>'1' + WHERE del<>1 AND user_id=?", $_SESSION['user_id']); @@ -40,7 +40,7 @@ $start_row = ($CONTACTS_LIST['page']-1) * $CONFIG['pagesize']; // get contacts from DB $sql_result = $DB->limitquery("SELECT * FROM ".get_table_name('contacts')." - WHERE del<>'1' + WHERE del<>1 AND user_id=? ORDER BY name", $start_row, 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) diff --git a/program/steps/addressbook/show.inc b/program/steps/addressbook/show.inc index 83db486cc..960ea1c45 100644 --- a/program/steps/addressbook/show.inc +++ b/program/steps/addressbook/show.inc @@ -26,7 +26,7 @@ if ($_GET['_cid'] || $_POST['_cid']) $DB->query("SELECT * FROM ".get_table_name('contacts')." WHERE contact_id=? AND user_id=? - AND del<>'1'", + AND del<>1", $cid, $_SESSION['user_id']); |