Enhance documentation functionality by adding fxDocSchemaReady function and updating fxBibBlockHeader to support optional documentation overlay. Increment version code to 4.72.646 in inc_settings.php.
This commit is contained in:
@ -5,6 +5,7 @@ define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/..') . '/');
|
|||||||
|
|
||||||
// initialiser la variable $binEnvironementDev en utiliant le nom de domaine
|
// initialiser la variable $binEnvironementDev en utiliant le nom de domaine
|
||||||
include_once APPLICATION_PATH . 'php/inc_fonctions_sl.php';
|
include_once APPLICATION_PATH . 'php/inc_fonctions_sl.php';
|
||||||
|
include_once APPLICATION_PATH . 'php/inc_fx_doc.php';
|
||||||
include_once APPLICATION_PATH . 'php/inc_settings.php';
|
include_once APPLICATION_PATH . 'php/inc_settings.php';
|
||||||
include_once APPLICATION_PATH . 'php/inc_mysql.php';
|
include_once APPLICATION_PATH . 'php/inc_mysql.php';
|
||||||
include_once APPLICATION_PATH . 'php/inc_dates.php';
|
include_once APPLICATION_PATH . 'php/inc_dates.php';
|
||||||
|
|||||||
@ -33,6 +33,26 @@ function fxDocLangue() {
|
|||||||
return !empty($strLangue) ? $strLangue : 'fr';
|
return !empty($strLangue) ? $strLangue : 'fr';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Tables doc_* présentes en BD (évite erreur si SQL module pas encore exécuté). */
|
||||||
|
function fxDocSchemaReady() {
|
||||||
|
global $objDatabase;
|
||||||
|
|
||||||
|
static $blnReady = null;
|
||||||
|
|
||||||
|
if ($blnReady !== null) {
|
||||||
|
return $blnReady;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($objDatabase)) {
|
||||||
|
$blnReady = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$qry = $objDatabase->fxQuery("SHOW TABLES LIKE 'doc_page'");
|
||||||
|
$blnReady = ($qry && mysqli_num_rows($qry) > 0);
|
||||||
|
return $blnReady;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Charge en mémoire toutes les pages doc pour une page PHP (comme obtenirTextepage).
|
* Charge en mémoire toutes les pages doc pour une page PHP (comme obtenirTextepage).
|
||||||
* Remplit $vdoc_page[doc_page_clef] = row.
|
* Remplit $vdoc_page[doc_page_clef] = row.
|
||||||
@ -49,7 +69,7 @@ function obtenirDocPage($page = null, $langue = null) {
|
|||||||
|
|
||||||
$vdoc_page = array();
|
$vdoc_page = array();
|
||||||
|
|
||||||
if (!isset($objDatabase)) {
|
if (!isset($objDatabase) || !fxDocSchemaReady()) {
|
||||||
return $vdoc_page;
|
return $vdoc_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +107,7 @@ function fxDocGetAnchorRow($clef, $mem_global = 0) {
|
|||||||
return $anchorCache[$cacheKey];
|
return $anchorCache[$cacheKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($objDatabase) || $clef === '') {
|
if (!isset($objDatabase) || $clef === '' || !fxDocSchemaReady()) {
|
||||||
$anchorCache[$cacheKey] = array();
|
$anchorCache[$cacheKey] = array();
|
||||||
return $anchorCache[$cacheKey];
|
return $anchorCache[$cacheKey];
|
||||||
}
|
}
|
||||||
@ -127,7 +147,7 @@ function fxDocGetModulePages($modClef, $langue = null, $mem_global = 0) {
|
|||||||
$strPrg = fxDocPrg($mem_global);
|
$strPrg = fxDocPrg($mem_global);
|
||||||
$modClef = fxDocResolveModClef($modClef, $mem_global);
|
$modClef = fxDocResolveModClef($modClef, $mem_global);
|
||||||
|
|
||||||
if (!isset($objDatabase) || $modClef === '') {
|
if (!isset($objDatabase) || $modClef === '' || !fxDocSchemaReady()) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,7 +186,7 @@ function fxDocGetPageRow($clef, $mem_global = 0) {
|
|||||||
return $vdoc_page[$clef];
|
return $vdoc_page[$clef];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($objDatabase) || $clef === '') {
|
if (!isset($objDatabase) || $clef === '' || !fxDocSchemaReady()) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2780,9 +2780,14 @@ function fxBibTexteAide($clef, $mem_echo = 1, $strFallback = '') {
|
|||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Titre d'en-tête de bloc (assignation, gestion…) + aide. */
|
/** Titre d'en-tête de bloc (assignation, gestion…) + aide + doc overlay optionnel. */
|
||||||
function fxBibBlockHeader($clef, $strFallback = '') {
|
function fxBibBlockHeader($clef, $strFallback = '', $docAnchorClef = '') {
|
||||||
return '<span class="epr-header-label">' . fxBibEsc(fxBibTexte($clef, 0, $strFallback)) . fxBibAideButton($clef) . '</span>';
|
$html = '<span class="epr-header-label">' . fxBibEsc(fxBibTexte($clef, 0, $strFallback)) . fxBibAideButton($clef);
|
||||||
|
if ($docAnchorClef !== '') {
|
||||||
|
$html .= fxDocRenderTrigger($docAnchorClef);
|
||||||
|
$html .= fxAdminDocButton($docAnchorClef);
|
||||||
|
}
|
||||||
|
return $html . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Cellule d'en-tête de colonne séquence + aide optionnelle (info_texte peut être vide). */
|
/** Cellule d'en-tête de colonne séquence + aide optionnelle (info_texte peut être vide). */
|
||||||
@ -3082,7 +3087,7 @@ if ($teamMode <= 0) {
|
|||||||
|
|
||||||
<?php /* MSIN-4379 — Assignation de dossard : séquences + actions (ex 3e colonne). */ ?>
|
<?php /* MSIN-4379 — Assignation de dossard : séquences + actions (ex 3e colonne). */ ?>
|
||||||
<div class="epr-block epr-block-assign">
|
<div class="epr-block epr-block-assign">
|
||||||
<div class="epr-header"><?php echo fxBibBlockHeader('bib_v4_assign_title', 'Assignation de dossard'); ?></div>
|
<div class="epr-header"><?php echo fxBibBlockHeader('bib_v4_assign_title', 'Assignation de dossard', 'bib_v4_assign_doc'); ?></div>
|
||||||
<div class="epr-content">
|
<div class="epr-content">
|
||||||
|
|
||||||
<?php if (count($tabBibStats) == 0) { ?>
|
<?php if (count($tabBibStats) == 0) { ?>
|
||||||
@ -3115,6 +3120,8 @@ if ($teamMode <= 0) {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php echo fxDocRenderModule('bib_v4_assign_doc'); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
function fxInfosBibRange($epr_id = 0, $epr_bib_id = 0){
|
function fxInfosBibRange($epr_id = 0, $epr_bib_id = 0){
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
* Constantes *
|
* Constantes *
|
||||||
*
|
*
|
||||||
**************/
|
**************/
|
||||||
define('_VERSION_CODE', '4.72.645');
|
define('_VERSION_CODE', '4.72.646');
|
||||||
define('_DATE_CODE', '2026-06-17');
|
define('_DATE_CODE', '2026-06-17');
|
||||||
//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