MSIN-4479 — Update alert messages in bib-assignments.js and inc_fx_promoteur.php to use new dataset keys for error handling. Ensure count function handles null results correctly to prevent JSON pollution. Increment version code to 4.72.869.
This commit is contained in:
@ -2408,7 +2408,8 @@
|
|||||||
if (!/^\d+$/.test(strQteTotale)
|
if (!/^\d+$/.test(strQteTotale)
|
||||||
|| !Number.isSafeInteger(intQteTotale)
|
|| !Number.isSafeInteger(intQteTotale)
|
||||||
|| intQteTotale > 9999999) {
|
|| intQteTotale > 9999999) {
|
||||||
alert(bibJs('err-generic'));
|
// MSIN-4479 — data-js-err-generic → dataset.jsErrGeneric
|
||||||
|
alert(bibJs('jsErrGeneric') || 'Erreur');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2443,10 +2444,10 @@
|
|||||||
bibApplyQteData(result.data);
|
bibApplyQteData(result.data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
alert((result && result.message) || bibJs('err-generic'));
|
alert((result && result.message) || bibJs('jsErrGeneric') || 'Erreur');
|
||||||
})
|
})
|
||||||
.catch(function () {
|
.catch(function () {
|
||||||
alert(bibJs('server-error'));
|
alert(bibJs('jsServerError') || bibJs('jsErrGeneric') || 'Erreur serveur');
|
||||||
})
|
})
|
||||||
.finally(function () {
|
.finally(function () {
|
||||||
bibLoaderHide();
|
bibLoaderHide();
|
||||||
|
|||||||
@ -2641,7 +2641,8 @@ function fxGetQuantitesEvenement($intEpreuve) {
|
|||||||
|
|
||||||
$sqlInscriptions = 'select p.no_bib, p.par_id, p.par_prenom, p.par_nom, e.pec_id_original, e.epr_id, e.eve_id, e.pec_id, e.is_cancelled, p.rol_id, e.no_commande, e.no_panier, e.no_equipe from resultats_epreuves_commandees e, resultats_participants p where p.is_cancelled = 0 AND p.epr_id = ' . intval($tabEpreuve['epr_id']) . ' AND p.epr_id = e.epr_id and p.pec_id = e.pec_id_original group by e.pec_id_original';
|
$sqlInscriptions = 'select p.no_bib, p.par_id, p.par_prenom, p.par_nom, e.pec_id_original, e.epr_id, e.eve_id, e.pec_id, e.is_cancelled, p.rol_id, e.no_commande, e.no_panier, e.no_equipe from resultats_epreuves_commandees e, resultats_participants p where p.is_cancelled = 0 AND p.epr_id = ' . intval($tabEpreuve['epr_id']) . ' AND p.epr_id = e.epr_id and p.pec_id = e.pec_id_original group by e.pec_id_original';
|
||||||
$tabInscriptions = $objDatabase->fxGetResults($sqlInscriptions);
|
$tabInscriptions = $objDatabase->fxGetResults($sqlInscriptions);
|
||||||
$intNbInscriptions = count($tabInscriptions);
|
// MSIN-4479 — fxGetResults peut renvoyer null (0 ligne) ; count(null) pollue le JSON AJAX si display_errors.
|
||||||
|
$intNbInscriptions = is_array($tabInscriptions) ? count($tabInscriptions) : 0;
|
||||||
|
|
||||||
$intTotalOriginal += $tabEpreuve['epr_qte_origine'];
|
$intTotalOriginal += $tabEpreuve['epr_qte_origine'];
|
||||||
$intTotalAvailable += $tabEpreuve['epr_qte'];
|
$intTotalAvailable += $tabEpreuve['epr_qte'];
|
||||||
@ -2681,7 +2682,8 @@ function fxGetQuantites($intEpreuve) {
|
|||||||
|
|
||||||
$sqlInscriptions = 'select p.no_bib, p.par_id, p.par_prenom, p.par_nom, e.pec_id_original, e.epr_id, e.eve_id, e.pec_id, e.is_cancelled, p.rol_id, e.no_commande, e.no_panier, e.no_equipe from resultats_epreuves_commandees e, resultats_participants p where p.is_cancelled = 0 AND p.epr_id = ' . intval($intEpreuve) . ' AND p.epr_id = e.epr_id and p.pec_id = e.pec_id_original group by e.pec_id_original';
|
$sqlInscriptions = 'select p.no_bib, p.par_id, p.par_prenom, p.par_nom, e.pec_id_original, e.epr_id, e.eve_id, e.pec_id, e.is_cancelled, p.rol_id, e.no_commande, e.no_panier, e.no_equipe from resultats_epreuves_commandees e, resultats_participants p where p.is_cancelled = 0 AND p.epr_id = ' . intval($intEpreuve) . ' AND p.epr_id = e.epr_id and p.pec_id = e.pec_id_original group by e.pec_id_original';
|
||||||
$tabInscriptions = $objDatabase->fxGetResults($sqlInscriptions);
|
$tabInscriptions = $objDatabase->fxGetResults($sqlInscriptions);
|
||||||
$intNbInscriptions = count($tabInscriptions);
|
// MSIN-4479 — même garde que fxGetQuantitesEvenement (null = 0 inscription).
|
||||||
|
$intNbInscriptions = is_array($tabInscriptions) ? count($tabInscriptions) : 0;
|
||||||
|
|
||||||
$arrRetour = array(
|
$arrRetour = array(
|
||||||
'qte_origine' => intval($tabEpreuve['epr_qte_origine']),
|
'qte_origine' => intval($tabEpreuve['epr_qte_origine']),
|
||||||
|
|||||||
@ -7,8 +7,8 @@
|
|||||||
* Constantes *
|
* Constantes *
|
||||||
*
|
*
|
||||||
**************/
|
**************/
|
||||||
define('_VERSION_CODE', '4.72.868'); // mise en prod — cache-bust loader CSS/JS (ms1-loader)
|
define('_VERSION_CODE', '4.72.869'); // MSIN-4479 — cache-bust bib-assignments (alert qte)
|
||||||
define('_DATE_CODE', '2026-07-23');
|
define('_DATE_CODE', '2026-07-24');
|
||||||
//MSIN-4290
|
//MSIN-4290
|
||||||
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');
|
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user