[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 18/73: Direct Access with a Single AC (withou
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 18/73: Direct Access with a Single AC (without the full path) |
Date: |
Fri, 28 May 2021 05:26:24 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 7810af1295efb975fb890922660f608cbf1510e9
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Apr 11 12:51:53 2021 +0200
Direct Access with a Single AC (without the full path)
---
html/do.php | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/html/do.php b/html/do.php
index 471e89c..b75a754 100644
--- a/html/do.php
+++ b/html/do.php
@@ -266,7 +266,35 @@ if (isset($_REQUEST['ac']))
array($AC,$user_profile));
try {
- if (count($amenu_id) == 0 ) { throw new Exception(_('Erreur
menu'),10);}
+ if (count($amenu_id) == 0 ) {
+ // if only an Access Direct is asked without the full path
+
+ $aAccess=[];
+ // Find the possible path pm_id_v3 / pm_id_v2 / pm_id_v1
+ $direct_ac=$cn->get_array("select
me_file,me_parameter,me_javascript from profile_menu
+ join menu_ref using (me_code)
+ where
+ p_id=$2
+ and me_code=$1", [strtoupper($AC),$user_profile]);
+
+ // if the me_code is available for user, find all the possible path
+ if (!empty($direct_ac)) {
+ $aAccess=$cn->get_array("select code, me_code from
v_menu_description where me_code=$1 and p_id=$2",
+ [strtoupper($AC),$user_profile]);
+ }
+
+ if (empty($aAccess)) {
+ throw new Exception(_('Erreur menu'),10);
+ }
+
+ // retrieve the element path
+ $amenu_id=$cn->get_array('select
+ pm_id_v3,pm_id_v2,pm_id_v1
+ from v_menu_profile
+ where code= upper($1) and p_id=$2',
+ array($aAccess[0]['code'],$user_profile));
+
+ }
if ( count($amenu_id)> 1) {
$tmp=$amenu_id[0];
$amenu_id=[];
- [Noalyss-commit] [noalyss] 22/73: Fix bug : not TVA asked, (continued)
- [Noalyss-commit] [noalyss] 22/73: Fix bug : not TVA asked, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 20/73: Cosmetic : place of login, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 31/73: Task #0001961: Devise, cosmetic align number, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 33/73: CURRENCY : conversion problem, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 32/73: Fix bug Forecast, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 15/73: Cosmetic and small bugs, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 17/73: Cosmetic :, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 14/73: Cosmetic bg color tabs, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 42/73: Cosmetic : position of "invoice, template , ..." after saving an operation, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 43/73: Improve Manage_Table : align column numeric to the right by default, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 18/73: Direct Access with a Single AC (without the full path),
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 30/73: Historic : search on currency, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 26/73: Cosmetic : select_box for javascript , display the selected option, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 25/73: Cosmetic : icon in dialog box, lightblue when hover, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 46/73: Improve Sort Table ,, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 27/73: Javascript : waiting box display when exporting in PDF or CSV, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 37/73: Cosmetic improve smoke dg box, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 39/73: Bug #0001971: erreur calcul dans champ prix/unité htva, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 06/73: Cosmetic, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 08/73: Warning if PHPVERSION < 7.2, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 10/73: Cosmetic : update fontello, button inplace_edit, doc, logo and dashboad, Dany De Bontridder, 2021/05/28