From 4cf2ef98d01bdaec79d30741efdabfbdf31ad4da Mon Sep 17 00:00:00 2001 From: stephan Date: Wed, 8 Jul 2026 09:50:09 -0400 Subject: [PATCH] Enhance fxPromoteurHubGetEventLinks function to conditionally load access management and update version code to 4.72.746 This commit modifies the `fxPromoteurHubGetEventLinks` function to include a conditional check for the existence of the `fxInscrGestionCanAccess` function. If it does not exist, the `inc_fx_inscriptions_gestion.php` file is loaded to evaluate access rights. This change improves the modularity and functionality of the promoteur hub by ensuring that access management is properly handled in AJAX contexts. --- php/inc_fx_promoteur_hub.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/php/inc_fx_promoteur_hub.php b/php/inc_fx_promoteur_hub.php index d145b00..902cbdd 100644 --- a/php/inc_fx_promoteur_hub.php +++ b/php/inc_fx_promoteur_hub.php @@ -581,7 +581,12 @@ function fxPromoteurHubGetEventLinks($arrItem, $strLangue) $arrGestion[] = array('label' => fxPromoteurHubTexte('tableau_promoteur_menueinscription', 0), 'url' => $strCompte . 'inc_tableau_inscriptions?promoteur_eve_id=' . $strE . '&lng=' . $strLangue, 'icon' => 'fa-users'); - if (function_exists('fxInscrGestionCanAccess') && fxInscrGestionCanAccess($intComId, $intEveId)) { + // Menu hub charge en AJAX (ajax_promoteur_hub.php) sans passer par compte.php : + // inc_fx_inscriptions_gestion.php doit etre charge ici pour evaluer les droits V2. + if (!function_exists('fxInscrGestionCanAccess')) { + require_once __DIR__ . '/inc_fx_inscriptions_gestion.php'; + } + if (fxInscrGestionCanAccess($intComId, $intEveId)) { $arrGestion[] = array('label' => fxInscrGestionPromoteurMenuLabel(), 'url' => $strCompte . 'inc_tableau_inscriptions_gestion?promoteur_eve_id=' . $strE . '&lng=' . $strLangue, 'icon' => 'fa-users'); }