From 3c366a309009eefa2e64243e84aa36378114ab19 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 24 Jun 2012 17:32:22 +0000 Subject: [PATCH] when profile delete do not show the detail --- include/profile.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/profile.inc.php b/include/profile.inc.php index 0e27e171a..dc0f8548a 100644 --- a/include/profile.inc.php +++ b/include/profile.inc.php @@ -167,16 +167,16 @@ if (isset($_POST['delete_profil'])) $cn->start(); if ($p_id == 1) { - throw new Exception('On ne peut effacer le profil par défaut'); + throw new Exception('On ne peut pas effacer le profil par défaut'); } $new_id = $cn->get_value("delete from profile where p_id=$1 ", array($p_id)); $cn->commit(); + } catch (Exception $exc) { echo alert($exc->getMessage()); - ; $cn->rollback(); } } @@ -346,4 +346,8 @@ if (isset($_POST['p_id'])) require_once 'ajax_get_profile.php'; } echo ''; +if ( isset($_POST['delete_profil'] )) +{ + echo create_script(" $('detail_profile').hide()"); +} ?>