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.
This commit is contained in:
2026-07-08 09:50:09 -04:00
parent 1322511cfd
commit 4cf2ef98d0

View File

@ -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');
}