From e2f609cd0b8bce8fdb74cc617b3883e60ca4f19f Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Mon, 5 Feb 2007 10:31:38 +0000 Subject: [PATCH] Backport and fix contact deletion on mysql5 git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1485 839d8a87-29fc-0310-9880-83ba4fa771e5 --- modules/carnet.php | 4 ++-- templates/profile/profile.tpl | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/modules/carnet.php b/modules/carnet.php index 32841b6..f833946 100644 --- a/modules/carnet.php +++ b/modules/carnet.php @@ -197,14 +197,14 @@ class CarnetModule extends PLModule case 'retirer': if (is_numeric($user)) { if (XDB::execute('DELETE FROM contacts - WHERE uid = {?} AND contact = {?}', + WHERE uid = {?} AND contact = {?}', $uid, $user)) { $page->trig("Contact retiré !"); } } else { if (XDB::execute( - 'DELETE FROM contacts + 'DELETE FROM c USING contacts AS c INNER JOIN aliases AS a ON (c.contact=a.id and a.type!="homonyme") WHERE c.uid = {?} AND a.alias={?}', $uid, $user)) diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl index bb8f381..1b49918 100644 --- a/templates/profile/profile.tpl +++ b/templates/profile/profile.tpl @@ -22,9 +22,12 @@ {literal}