si pas de blockchaine, on transforme par une valeur vide

This commit is contained in:
Christophe 2019-12-23 21:57:03 +01:00
parent f9aa495cd3
commit 405332fd85

View file

@ -37,12 +37,13 @@ function trouver_blocklog($id_objet, $objet, $id = false){
function afficher_blocklog($texte, $id_dossier, $objet){ function afficher_blocklog($texte, $id_dossier, $objet){
$objet = trim($objet); $objet = trim($objet);
$blockchaine = '';
if (intval($id_dossier) and $objet) { if (intval($id_dossier) and $objet) {
$blockchaine = trouver_blocklog($id_dossier, $objet); $blockchaine = trouver_blocklog($id_dossier, $objet);
}
$texte = str_replace('@@blockchaine@@', $blockchaine, $texte); $texte = str_replace('@@blockchaine@@', $blockchaine, $texte);
$texte = str_replace('@@blocklog@@', $blockchaine, $texte); $texte = str_replace('@@blocklog@@', $blockchaine, $texte);
}
return $texte; return $texte;
} }