From bb9cd05ea807ad46b5c77e0d1501e636d3c53eaf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Apr 2019 20:02:43 +0200 Subject: [PATCH] Fix phpcs --- htdocs/compta/paiement/list.php | 4 ++-- htdocs/core/lib/functions2.lib.php | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index b7d537c3954..c005e0d70e6 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -111,7 +111,7 @@ $formother=new FormOther($db); llxHeader('', $langs->trans('ListPayment')); -if (GETPOST("orphelins","alpha")) +if (GETPOST("orphelins", "alpha")) { // Payments not linked to an invoice. Should not happend. For debug only. $sql = "SELECT p.rowid, p.ref, p.datep as dp, p.amount,"; @@ -375,7 +375,7 @@ if ($resql) $i++; } - + // Show total line if (isset($totalarray['pos'])) { diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 2d76c26e917..844e9b70c42 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -2438,20 +2438,22 @@ function randomColor($min = 0, $max = 255) 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')) { + /** + * Encode string for xml usage + * + * @param string $string String to encode + * @return string String encoded + */ function dolEscapeXML($string) { return strtr($string, array('\''=>''','"'=>'"','&'=>'&','<'=>'<','>'=>'>')); } } + /** * Return automatic or manual in current language *