diff --git a/compte.php b/compte.php
index f4b289d..d13dbb1 100644
--- a/compte.php
+++ b/compte.php
@@ -709,6 +709,7 @@ require_once("inc_header.php");
$blnBoutonRetour = false;
$footer_script = true;
$blnHideCompteTitle = true;
+ fxInscrMobileInitTextes($strLangue);
include("inc_tableau_inscriptions_mobile.php");
break;
case 'compte_inc_tableau_mail_entraineurs':
diff --git a/inc_tableau_promoteur.php b/inc_tableau_promoteur.php
index e489c64..46e0cb7 100644
--- a/inc_tableau_promoteur.php
+++ b/inc_tableau_promoteur.php
@@ -263,7 +263,7 @@ if ($intEveId != 0) {
+ href="/compte/inc_tableau_inscriptions_mobile?promoteur_eve_id=&lng=">
diff --git a/php/inc_fx_compte.php b/php/inc_fx_compte.php
index 7f75937..b7e299e 100644
--- a/php/inc_fx_compte.php
+++ b/php/inc_fx_compte.php
@@ -1493,12 +1493,13 @@ function fxShowMenuCompte($arrCompteClient, $strLangue)
}
- // Inscriptions mobile v2 (independant du legacy promoteur)
+ // Inscriptions mobile v2 — lien /mobile seulement si pas de menu promoteur legacy
if (!function_exists('fxInscrMobileGetPromoteurEveIds')) {
require_once dirname(__FILE__) . '/inc_fx_inscriptions_mobile.php';
}
$arrMobileEveIds = fxInscrMobileGetPromoteurEveIds($arrCompteClient['com_id']);
- if (count($arrMobileEveIds) > 0) {
+ $blnShowMobileDirect = (count($arrMobileEveIds) > 0 && !fxInscrMobileUserHasPromoteurMenu($arrCompteClient['com_id']));
+ if ($blnShowMobileDirect) {
$strMobileUrl = $vDomaine . '/mobile';
if (count($arrMobileEveIds) === 1) {
$strMobileUrl .= '?promoteur_eve_id=' . urlencode(base64_encode($arrMobileEveIds[0]));
diff --git a/php/inc_fx_inscriptions_mobile.php b/php/inc_fx_inscriptions_mobile.php
index a78537a..b026ba2 100644
--- a/php/inc_fx_inscriptions_mobile.php
+++ b/php/inc_fx_inscriptions_mobile.php
@@ -2,12 +2,32 @@
/**
* Liste inscriptions mobile — recherche, filtres, cartes, fiche.
+ *
+ * Deux entrees distinctes (meme module, navigation differente) :
+ * - Promoteur : /compte/inc_tableau_inscriptions_mobile → retour inc_tableau_promoteur
+ * - Acces v2 seul : /mobile → retour /mobile ou Mon compte
+ *
+ * Droits : v2 uniquement (fxInscrMobileCanAccess). i18n : toujours info_prg compte.php.
*/
function fxInscrMobileIsEntry() {
return defined('MS1_INSCR_MOBILE_ENTRY') && MS1_INSCR_MOBILE_ENTRY;
}
+/** Utilisateur avec menu promoteur legacy (section Info promoteur). */
+function fxInscrMobileUserHasPromoteurMenu($intComId) {
+ global $objDatabase;
+
+ $row = $objDatabase->fxGetRow(
+ 'SELECT com_eve_promoteur, com_rapports FROM inscriptions_comptes WHERE com_id = ' . intval($intComId)
+ );
+ if ($row === null) {
+ return false;
+ }
+
+ return trim((string)$row['com_eve_promoteur']) !== '' || trim((string)$row['com_rapports']) !== '';
+}
+
/** Permissions v2 requises pour la fiche inscriptions mobile (web). */
function fxInscrMobilePermKeysView() {
return array('registrations.view', 'inscriptions_mobile.view');