From 66773789e392305bba4cdf7ed8e6ae3b8380de51 Mon Sep 17 00:00:00 2001
From: svncommit <devs@roundcube.net>
Date: Thu, 27 Oct 2005 09:45:33 -0400
Subject: [PATCH] 

---
 program/steps/addressbook/edit.inc |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc
index db7b77a..24300bf 100644
--- a/program/steps/addressbook/edit.inc
+++ b/program/steps/addressbook/edit.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:                                                              |
  |   Show edit form for a contact entry or to add a new one              |
@@ -23,13 +23,12 @@
 if (($_GET['_cid'] || $_POST['_cid']) && $_action=='edit')
   {
   $cid = $_POST['_cid'] ? $_POST['_cid'] : $_GET['_cid'];
-  $DB->query(sprintf("SELECT * FROM %s
-                      WHERE  contact_id=%d
-                      AND    user_id=%d
-                      AND    del!='1'",
-                     get_table_name('contacts'),
-                     $cid,
-                     $_SESSION['user_id']));
+  $DB->query("SELECT * FROM ".get_table_name('contacts')."
+             WHERE  contact_id=?
+             AND    user_id=?
+             AND    del<>'1'",
+             $cid,
+             $_SESSION['user_id']);
   
   $CONTACT_RECORD = $DB->fetch_assoc();
   

--
Gitblit v1.9.1