fix translation removing html

This commit is contained in:
Frédéric FRANCE 2020-12-04 21:08:51 +01:00 committed by GitHub
parent 05a560c2e3
commit 4039ca269f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,18 +90,18 @@ print '<table class="border centpercent">';
print '<tr class="border"><td style="padding: 4px">'; print '<tr class="border"><td style="padding: 4px">';
if (!empty($conf->syslog->enabled)) if (!empty($conf->syslog->enabled)) {
{
print '<input type="radio" name="choice" value="logfile"'; print '<input type="radio" name="choice" value="logfile"';
print ($choice && $choice == 'logfile') ? ' checked' : ''; print ($choice && $choice == 'logfile') ? ' checked' : '';
$filelogparam = $filelog; $filelogparam = $filelog;
if ($user->admin && preg_match('/^dolibarr.*\.log$/', basename($filelog))) if ($user->admin && preg_match('/^dolibarr.*\.log$/', basename($filelog))) {
{
$filelogparam = '<a class="wordbreak" href="'.DOL_URL_ROOT.'/document.php?modulepart=logs&file='; $filelogparam = '<a class="wordbreak" href="'.DOL_URL_ROOT.'/document.php?modulepart=logs&file=';
$filelogparam .= basename($filelog); $filelogparam .= basename($filelog);
$filelogparam .= '">'.$filelog.'</a>'; $filelogparam .= '">'.$filelog.'</a>';
} }
print '> '.$langs->trans("PurgeDeleteLogFile", $filelogparam); $desc = $langs->trans("PurgeDeleteLogFile", '{filelogparam}');
$desc = str_replace('{filelogparam}', $filelogparam, $desc);
print '> '.$desc;
print '<br><br>'; print '<br><br>';
} }
@ -123,8 +123,7 @@ print '</td></tr></table>';
print '</form>'; print '</form>';
if (preg_match('/^confirm/i', $choice)) if (preg_match('/^confirm/i', $choice)) {
{
print '<br>'; print '<br>';
$formquestion = array(); $formquestion = array();
print $form->formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2); print $form->formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2);