Show first line of code

This commit is contained in:
Laurent Destailleur 2019-09-10 15:58:56 +02:00
parent 5fa40f1d62
commit eb2f48332b

View File

@ -55,7 +55,7 @@ function dolStripPhpCode($str, $replacewith = '')
//remove content before closing tag
if (count($partlings) > 1) $partlings[0] = ''; // Todo why a count > 1 and not >= 1 ?
//append to out string
$newstr .= '<span class="phptag">'.$replacewith.'<!-- '.$phppart.' --></span>'.implode('', $partlings);
$newstr .= '<span class="phptag" class="tooltip" title="'.dol_escape_htmltag(dolGetFirstLineOfText($phppart).'...').'">'.$replacewith.'<!-- '.$phppart.' --></span>'.implode('', $partlings);
}
}
}