Fix phpcs

This commit is contained in:
Laurent Destailleur 2019-04-02 20:02:43 +02:00
parent 42fda54edf
commit bb9cd05ea8
2 changed files with 10 additions and 8 deletions

View File

@ -111,7 +111,7 @@ $formother=new FormOther($db);
llxHeader('', $langs->trans('ListPayment')); llxHeader('', $langs->trans('ListPayment'));
if (GETPOST("orphelins","alpha")) if (GETPOST("orphelins", "alpha"))
{ {
// Payments not linked to an invoice. Should not happend. For debug only. // Payments not linked to an invoice. Should not happend. For debug only.
$sql = "SELECT p.rowid, p.ref, p.datep as dp, p.amount,"; $sql = "SELECT p.rowid, p.ref, p.datep as dp, p.amount,";
@ -375,7 +375,7 @@ if ($resql)
$i++; $i++;
} }
// Show total line // Show total line
if (isset($totalarray['pos'])) if (isset($totalarray['pos']))
{ {

View File

@ -2438,20 +2438,22 @@ function randomColor($min = 0, $max = 255)
return randomColorPart($min, $max) . randomColorPart($min, $max) . randomColorPart($min, $max); return randomColorPart($min, $max) . randomColorPart($min, $max) . randomColorPart($min, $max);
} }
/**
* Encode string for xml usage
*
* @param string $string String to encode
* @return string String encoded
*/
if (! function_exists('dolEscapeXML')) if (! function_exists('dolEscapeXML'))
{ {
/**
* Encode string for xml usage
*
* @param string $string String to encode
* @return string String encoded
*/
function dolEscapeXML($string) function dolEscapeXML($string)
{ {
return strtr($string, array('\''=>'&apos;','"'=>'&quot;','&'=>'&amp;','<'=>'&lt;','>'=>'&gt;')); return strtr($string, array('\''=>'&apos;','"'=>'&quot;','&'=>'&amp;','<'=>'&lt;','>'=>'&gt;'));
} }
} }
/** /**
* Return automatic or manual in current language * Return automatic or manual in current language
* *