Refactor promoteur back URL logic to prioritize new hub structure, enabling event focus functionality. Introduce fxPromoteurHubOrLegacyBackUrl for streamlined navigation based on event ID availability. Update related functions for consistency and clarity. This change enhances user experience by ensuring proper redirection based on session and event context.

This commit is contained in:
2026-07-14 08:35:59 -04:00
parent 19b9369e77
commit 2e17136f01
5 changed files with 42 additions and 17 deletions

View File

@ -32,10 +32,8 @@ if (isset($_GET['promoteur_eve_id'])) {
if ($intEveId <= 0 || (empty($_SESSION['com_id']) && empty($_SESSION['usa_id']))
|| (empty($_SESSION['usa_id'])
&& !fxEveAccesHasAnyPermission($_SESSION['com_id'] ?? 0, $intEveId, array('dossards.manage', 'epreuves.edit_qte')))) {
$strRedirect = $vDomaine . '/compte/inc_tableau_promoteur';
if (!empty($_GET['promoteur_eve_id'])) {
$strRedirect .= '?promoteur_eve_id=' . urlencode($_GET['promoteur_eve_id']);
}
// MSIN-4399 — même retour que le bouton back (hub + focus si dispo).
$strRedirect = fxGetPromoteurBackUrl($intEveId > 0 ? $intEveId : 0, $strPage);
header('Location: ' . $strRedirect);
exit;
}