on permet de sortie à l'affichage que la chaine blocklog

This commit is contained in:
Christophe 2022-01-18 11:59:11 +01:00
parent b6710055e7
commit 25544d1588

View file

@ -41,7 +41,7 @@ function blockchaine_sur_pdf(){
return false; return false;
} }
function afficher_blocklog($texte, $id_dossier, $objet, $type = 'chaine'){ function afficher_blocklog($texte = '', $id_dossier, $objet, $type = 'chaine'){
$objet = trim($objet); $objet = trim($objet);
$blockchaine = '<span class="affichage_blockchaine">'; $blockchaine = '<span class="affichage_blockchaine">';
@ -57,6 +57,9 @@ function afficher_blocklog($texte, $id_dossier, $objet, $type = 'chaine'){
$blockchaine .= '</span>'; $blockchaine .= '</span>';
} }
} }
if (empty($texte)) {
return $blockchaine;
}
$texte = str_replace('@@blockchaine@@', $blockchaine, $texte); $texte = str_replace('@@blockchaine@@', $blockchaine, $texte);
$texte = str_replace('@@blocklog@@', $blockchaine, $texte); $texte = str_replace('@@blocklog@@', $blockchaine, $texte);