Refactor AJAX context in bib range handling to ensure translations are consistently linked to compte.php. Simplified language initialization and removed unnecessary conditionals for improved clarity.

This commit is contained in:
2026-06-16 15:12:44 -04:00
parent 08a4ba52f8
commit d6cd0df5ec

View File

@ -1,17 +1,15 @@
<?php
session_start();
// MSIN-4379 — Contexte traduction = compte.php (pas ajax_bib_range.php) ; pas d'auto-création info en AJAX.
// MSIN-4379 — Traductions toujours au nom de compte.php (jamais ajax_bib_range.php).
define('MS1_BIB_AJAX', true);
$_SERVER['PHP_SELF'] = '/compte.php';
$_SERVER['SCRIPT_NAME'] = '/compte.php';
require_once('php/inc_fonctions.php');
require_once('php/inc_fx_promoteur.php');
global $objDatabase, $vPage, $strLangue, $vtexte_page;
if (empty($strLangue)) {
$strLangue = $_SESSION['lang'] ?? 'fr';
}
$strLangue = $_SESSION['lang'] ?? 'fr';
$vPage = 'compte.php';
$vtexte_page = obtenirTextepage($vPage, $strLangue, 2);