From 77c28206a14b5bee3f3091f10cffd531bce5649c Mon Sep 17 00:00:00 2001 From: yllar <yllar.pajus@gmail.com> Date: Sat, 16 Dec 2006 13:25:16 -0500 Subject: [PATCH] updated ja and fr translations --- program/steps/mail/addcontact.inc | 33 +++++++++++++++------------------ 1 files changed, 15 insertions(+), 18 deletions(-) diff --git a/program/steps/mail/addcontact.inc b/program/steps/mail/addcontact.inc index 7f11024..b040581 100644 --- a/program/steps/mail/addcontact.inc +++ b/program/steps/mail/addcontact.inc @@ -6,7 +6,7 @@ | | | This file is part of the RoundCube Webmail client | | Copyright (C) 2005, RoundCube Dev. - Switzerland | - | All rights reserved. | + | Licensed under the GNU GPL | | | | PURPOSE: | | Add the submitted contact to the users address book | @@ -21,21 +21,19 @@ $REMOTE_REQUEST = TRUE; -if ($_GET['_address']) +if (!empty($_GET['_address'])) { - $contact_arr = $IMAP->decode_address_list($_GET['_address']); + $contact_arr = $IMAP->decode_address_list(get_input_value('_address', RCUBE_INPUT_GET, TRUE)); if (sizeof($contact_arr)) { $contact = $contact_arr[1]; if ($contact['mailto']) - $sql_result = $DB->query(sprintf("SELECT 1 FROM %s - WHERE user_id=%d - AND email='%s' - AND del!='1'", - get_table_name('contacts'), - $_SESSION['user_id'], - $contact['mailto'])); + $sql_result = $DB->query("SELECT 1 FROM ".get_table_name('contacts')." + WHERE user_id=? + AND email=? + AND del<>1", + $_SESSION['user_id'],$contact['mailto']); // contact entry with this mail address exists if ($sql_result && $DB->num_rows($sql_result)) @@ -43,15 +41,14 @@ else if ($contact['mailto']) { - $DB->query(sprintf("INSERT INTO %s - (user_id, name, email) - VALUES (%d, '%s', '%s')", - get_table_name('contacts'), - $_SESSION['user_id'], - $contact['name'], - $contact['mailto'])); + $DB->query("INSERT INTO ".get_table_name('contacts')." + (user_id, changed, del, name, email) + VALUES (?, ".$DB->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