[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 06/10: Menu : possibility to enter a AD direc
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 06/10: Menu : possibility to enter a AD directly without parent menu |
Date: |
Thu, 27 Aug 2015 01:33:56 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 37264786b27b95aae38598da4a787e7caee4d466
Author: Dany De Bontridder <address@hidden>
Date: Thu Aug 27 03:10:22 2015 +0200
Menu : possibility to enter a AD directly without parent menu
---
html/do.php | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/html/do.php b/html/do.php
index 51671d1..ad1eb3b 100644
--- a/html/do.php
+++ b/html/do.php
@@ -187,7 +187,17 @@ if (isset($_REQUEST['ac']))
array($AC,$user_profile));
try {
if ( count($amenu_id) != 1 ) {
- throw new Exception(_('Erreur menu'),10);
+ // if AC is a simple code and this menu can be accessed
+ // we should find the first menu which used it and change the
+ // request AC to it
+ $pm_id=$cn->get_array('select pm_id from profile_menu '
+ . ' where lower(me_code)=lower($1) and p_id=$2',
+ array($AC,$user_profile));
+ if ( count($pm_id) > 0 ) {
+ show_menu($pm_id[0]['pm_id']);
+ } else {
+ 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
@@ -222,7 +232,7 @@ else
$_REQUEST['ac']=$default;
show_module($menu_id);
$all[0] = $default;
- show_menu($menu_id, 0);
+ show_menu($menu_id);
}
- [Noalyss-commit] [noalyss] branch master updated (47c5763 -> 44ecba2), Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 01/10: security, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 02/10: Cosmetic on small screen, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 04/10: Improve code, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 03/10: Code documentation, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 06/10: Menu : possibility to enter a AD directly without parent menu,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 07/10: cosmetic, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 08/10: traduction, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 09/10: Open a new tab for VERIFBIL, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 05/10: Correct export CSV and PDF, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 10/10: Bug : p_mesg is not set with writing report, Dany De Bontridder, 2015/08/26