From 8888381f6f37794cd276a5e75ba8483113b5b91d Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Thu, 20 Aug 2015 16:14:40 +0200 Subject: [PATCH] =?UTF-8?q?Task=20#1151=20-=20Am=C3=A9lioration=20configur?= =?UTF-8?q?ation=20des=20menus=20Bug=20:=20when=20=20adding=20new=20plugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/cfgplugin.inc.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/cfgplugin.inc.php b/include/cfgplugin.inc.php index 030f9a11d..b440dd33b 100644 --- a/include/cfgplugin.inc.php +++ b/include/cfgplugin.inc.php @@ -76,7 +76,19 @@ if ( isset ($_POST['save_plugin'])){ if ( $count == 0 ) { $a_plugin[$i]->insert(); } - $a_plugin[$i]->insert_profile_menu($profile,'EXT'); + try + { + $a_plugin[$i]->insert_profile_menu($profile,'EXT'); + } + catch (Exception $exc) + { + $profile_name=$cn->get_value('select profile.p_name from profile where p_id=$1' + ,array($profile)); + echo '

'; + echo "code $code"," profile $profile_name ",$exc->getMessage(); + echo '

'; + } + } else { // delete $a_plugin[$i]->remove_from_profile_menu ($profile);