Task #1151 - Amélioration configuration des menus

Bug : when  adding new plugin
This commit is contained in:
Dany De Bontridder 2015-08-20 16:14:40 +02:00
parent ff9bd15d47
commit 8888381f6f

View file

@ -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 '<p class="notice">';
echo "code $code"," profile $profile_name ",$exc->getMessage();
echo '</p>';
}
} else {
// delete
$a_plugin[$i]->remove_from_profile_menu ($profile);