From 7ced62b0d552211a07324407f848895070acd6b1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Mar 2006 14:55:04 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20La=20fonction=20yn=20n'affichait=20pas?= =?UTF-8?q?=20le=20bon=20libell=E9=20si=20param=20'yes'=20fourni.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/lib/functions.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index dd1c6caa321..97755e172f5 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -1684,10 +1684,10 @@ function get_default_tva($societe_vendeuse='', $societe_acheteuse='', $taux_prod */ function yn($yesno, $case=1) { global $langs; - if ($yesno == 0 || $yesno == 'no' || $yesno == 'false') - return $case?$langs->trans("No"):$langs->trans("no"); - if ($yesno == 1 || $yesno == 'yes' || $yesno == 'true') + if ($yesno == 1 || strtolower($yesno) == 'yes' || strtolower($yesno) == 'true') // A mettre avant test sur no a cause du == 0 return $case?$langs->trans("Yes"):$langs->trans("yes"); + if ($yesno == 0 || strtolower($yesno) == 'no' || strtolower($yesno) == 'false') + return $case?$langs->trans("No"):$langs->trans("no"); return "unknown"; }