noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 01/03: Correction menu, Typo title and forbid


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 01/03: Correction menu, Typo title and forbidden access for doc
Date: Tue, 25 Aug 2015 00:58:10 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit b2ca4e1ab45602a6cb46a5e838e031879d990139
Author: Dany De Bontridder <address@hidden>
Date:   Tue Aug 25 01:21:03 2015 +0200

    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 5bcce2d..3f918d6 100644
--- a/html/admin/setup.php
+++ b/html/admin/setup.php
@@ -1,6 +1,6 @@
 <!doctype html>
 <HTML><HEAD>
-    <TITLE>Noaliss - Mise à jour</TITLE>
+    <TITLE>Noalyss - Mise à jour</TITLE>
     <META http-equiv="Content-Type" content="text/html; charset=UTF8">
     </title>
 <head>
diff --git a/html/do.php b/html/do.php
index 90a5a04..9417f65 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 649e174..a785456 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");
        ?>
        <div 
style="margin:0px;padding:0px;background-color:red;text-align:center;">
         <h2 class="error"><?php echo $forbidden ?></h2>;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]