[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 04/19: Protect function nb , return the strin
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 04/19: Protect function nb , return the string if the parameter is not a float |
Date: |
Sat, 21 Jul 2018 07:47:38 -0400 (EDT) |
sparkyx pushed a commit to tag r700-currency-005
in repository noalyss.
commit 2051243c6541ce89244c62167e9fa64b83934743
Author: Dany De Bontridder <address@hidden>
Date: Fri Apr 20 19:25:25 2018 +0200
Protect function nb , return the string if the parameter is not a float
---
include/lib/noalyss_csv.class.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/lib/noalyss_csv.class.php
b/include/lib/noalyss_csv.class.php
index 11df760..4eefce8 100644
--- a/include/lib/noalyss_csv.class.php
+++ b/include/lib/noalyss_csv.class.php
@@ -170,7 +170,11 @@ class Noalyss_Csv
{
$p_number=trim($p_number);
if ($p_number=="") {return $p_number;}
- $r=number_format($p_number, 4, $this->sep_dec,'');
+ if ( isNumber($p_number) == 1 ) {
+ $r=number_format($p_number, 4, $this->sep_dec,'');
+ } else {
+ $r=$p_number;
+ }
return $r;
}
private function encode($str)
- [Noalyss-commit] [noalyss] 10/19: Fix todo_list : if list empty , gets an error in php 7.2, (continued)
- [Noalyss-commit] [noalyss] 10/19: Fix todo_list : if list empty , gets an error in php 7.2, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 13/19: Security fix : f_id is a number, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 15/19: Task #1619 : CFGLED change label for "Donner ici la fiche du compte en banque", Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 02/19: Task #448 : add currency to card -> history + export CSV, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 14/19: Security fix : f_id is a number, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 16/19: translation, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 11/19: Security : direct injection, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 19/19: Merge branch 'master' into r700-currency, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 17/19: CFGLED : security fix : remove $_REQUEST, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 18/19: Merge master, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 04/19: Protect function nb , return the string if the parameter is not a float,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 07/19: Missing class : missing class for acc_ledger, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 08/19: Bug 1600 : alphanumeric accounting must be case insensitive, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 12/19: Fix : security fixes see rapport exakat (Damien Seguy), Dany De Bontridder, 2018/07/21