2
0
forked from Wavyzz/dolibarr

Clean code

This commit is contained in:
Laurent Destailleur
2020-11-28 14:00:35 +01:00
parent 2989ff50fa
commit 41984f9934
2 changed files with 2 additions and 3 deletions

View File

@@ -420,7 +420,7 @@ if ($mode == 'template' && $user->admin) {
print '<td></td>'; print '<td></td>';
} else { } else {
print '<td>'.$printer->listprinterstemplates[$line]['name'].'</td>'; print '<td>'.$printer->listprinterstemplates[$line]['name'].'</td>';
print '<td>'.nl2br(htmlentities($printer->listprinterstemplates[$line]['template'])).'</td>'; print '<td>'.dol_htmlentitiesbr($printer->listprinterstemplates[$line]['template']).'</td>';
// edit icon // edit icon
print '<td><a class="editfielda paddingleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=template&amp;action=edittemplate&amp;templateid='.$printer->listprinterstemplates[$line]['rowid'].'">'; print '<td><a class="editfielda paddingleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=template&amp;action=edittemplate&amp;templateid='.$printer->listprinterstemplates[$line]['rowid'].'">';
print img_picto($langs->trans("Edit"), 'edit'); print img_picto($langs->trans("Edit"), 'edit');

View File

@@ -103,8 +103,7 @@ function dol_json_encode($elements)
*/ */
function _val($val) function _val($val)
{ {
if (is_string($val)) if (is_string($val)) {
{
// STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
$ascii = ''; $ascii = '';
$strlen_var = strlen($val); $strlen_var = strlen($val);