From 7a5c48e7f70b8bc938fcae3ffd2be0fdbeaab145 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Wed, 13 Dec 2006 02:17:24 -0500 Subject: [PATCH] Changed 'junk' label in French localization --- program/steps/addressbook/delete.inc | 41 ++++++++++++++++++----------------------- 1 files changed, 18 insertions(+), 23 deletions(-) diff --git a/program/steps/addressbook/delete.inc b/program/steps/addressbook/delete.inc index 99d9e33..b95988d 100644 --- a/program/steps/addressbook/delete.inc +++ b/program/steps/addressbook/delete.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: | | Delete the submitted contacts (CIDs) from the users address book | @@ -23,13 +23,11 @@ if ($_GET['_cid']) { - $DB->query(sprintf("UPDATE %s - SET del='1' - WHERE user_id=%d - AND contact_id IN (%s)", - get_table_name('contacts'), - $_SESSION['user_id'], - $_GET['_cid'])); + $DB->query("UPDATE ".get_table_name('contacts')." + SET del=1 + WHERE user_id=? + AND contact_id IN (".$_GET['_cid'].")", + $_SESSION['user_id']); $count = $DB->affected_rows(); if (!$count) @@ -40,12 +38,11 @@ // count contacts for this user - $sql_result = $DB->query(sprintf("SELECT COUNT(contact_id) AS rows - FROM %s - WHERE del!='1' - AND user_id=%d", - get_table_name('contacts'), - $_SESSION['user_id'])); + $sql_result = $DB->query("SELECT COUNT(contact_id) AS rows + FROM ".get_table_name('contacts')." + WHERE del<>1 + AND user_id=?", + $_SESSION['user_id']); $sql_arr = $DB->fetch_assoc($sql_result); $rowcount = $sql_arr['rows']; @@ -62,15 +59,13 @@ $start_row = ($_SESSION['page'] * $CONFIG['pagesize']) - $count; // get contacts from DB - $sql_result = $DB->query(sprintf("SELECT * FROM %s - WHERE del!='1' - AND user_id=%d - ORDER BY name - LIMIT %d, %d", - get_table_name('contacts'), - $_SESSION['user_id'], - $start_row, - $count)); + $sql_result = $DB->limitquery("SELECT * FROM ".get_table_name('contacts')." + WHERE del<>1 + AND user_id=? + ORDER BY name", + $start_row, + $count, + $_SESSION['user_id']); $commands .= rcmail_js_contacts_list($sql_result); -- Gitblit v1.9.1