From b2ca4e1ab45602a6cb46a5e838e031879d990139 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Tue, 25 Aug 2015 01:21:03 +0200 Subject: [PATCH] Correction menu, Typo title and forbidden access for doc --- html/admin/setup.php | 2 +- html/do.php | 28 ++++++++++++++++------------ include/ajax_view_action.php | 2 +- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/html/admin/setup.php b/html/admin/setup.php index 5bcce2d3f..3f918d68f 100644 --- a/html/admin/setup.php +++ b/html/admin/setup.php @@ -1,6 +1,6 @@ - Noaliss - Mise à jour + Noalyss - Mise à jour diff --git a/html/do.php b/html/do.php index 90a5a04fa..9417f6598 100644 --- a/html/do.php +++ b/html/do.php @@ -183,19 +183,23 @@ if (isset($_REQUEST['ac'])) pm_id_v3,pm_id_v2,pm_id_v1 from v_menu_profile where code= upper($1) and p_id=$2', array($AC,$user_profile)); - - if ( count($amenu_id) != 1 ) { - throw new Exception(_('Erreur menu')); + try { + if ( count($amenu_id) != 1 ) { + throw new Exception(_('Erreur menu'),10); + } + + $module_id=$cn->get_value('select case when pm_id_v3 = 0 then (case when pm_id_v2 = 0 then pm_id_v1 else pm_id_v2 end) else pm_id_v3 end + from v_menu_profile where p_id=$1 and upper(code)=upper($2)', + array($user_profile,$AC)); + $g_user->audit(); + // Show module and highligt selected one + show_module($module_id); + show_menu( $amenu_id[0]['pm_id_v3']); + show_menu( $amenu_id[0]['pm_id_v2']); + show_menu($amenu_id[0]['pm_id_v1']); + } catch (Exception $e) { + if ( $e->getCode() == 10 ) alert(_('Accès menu impossible')); } - $module_id=$cn->get_value('select case when pm_id_v3 = 0 then (case when pm_id_v2 = 0 then pm_id_v1 else pm_id_v2 end) else pm_id_v3 end - from v_menu_profile where p_id=$1 and upper(code)=upper($2)', - array($user_profile,$AC)); - $g_user->audit(); - // Show module and highligt selected one - show_module($module_id); - show_menu( $amenu_id[0]['pm_id_v3']); - show_menu( $amenu_id[0]['pm_id_v2']); - show_menu($amenu_id[0]['pm_id_v1']); } else { diff --git a/include/ajax_view_action.php b/include/ajax_view_action.php index 649e17473..a785456be 100644 --- a/include/ajax_view_action.php +++ b/include/ajax_view_action.php @@ -49,7 +49,7 @@ if ($g_user->can_write_action($ag_id) == true || $g_user->can_read_action($ag_id } else { - echo h2(_("Ce document n'est pas accessible"),"error"); + $forbidden = _("Ce document n'est pas accessible"); ?>

;