[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/15: Fix #0001277: <<header>> ne supporte p
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/15: Fix #0001277: <<header>> ne supporte pas caractères avec accent. |
Date: |
Fri, 5 Feb 2021 11:38:28 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 3a194a954518f2301198525361960996a05e7e23
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Tue Jan 26 12:29:36 2021 +0100
Fix #0001277: <<header>> ne supporte pas caractères avec accent.
---
include/class/acc_bilan.class.php | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/include/class/acc_bilan.class.php
b/include/class/acc_bilan.class.php
index 51b8b5f..a7d605a 100644
--- a/include/class/acc_bilan.class.php
+++ b/include/class/acc_bilan.class.php
@@ -272,8 +272,8 @@ class Acc_Bilan
throw new Exception(_("le formulaire id n'est pas donnee"));
$sql="select b_name,b_file_template,b_file_form,lower(b_type) as
b_type from bilan where".
- " b_id = ".$this->b_id;
- $res=$this->db->exec_sql($sql);
+ " b_id = $1";
+ $res=$this->db->exec_sql($sql,[$this->b_id]);
if ( Database::num_row($res)==0)
throw new Exception (_('Aucun enregistrement trouve'));
@@ -284,7 +284,7 @@ class Acc_Bilan
}
catch(Exception $Ex)
{
- record_log($e);
+ record_log($e);
echo $Ex->getMessage();
throw $Ex;
}
@@ -401,7 +401,7 @@ class Acc_Bilan
$regex="/<<\\$[A-Z]*[0-9]*>>/";
$lt="<";
$gt=">";
- $header_txt=header_txt($this->db);
+ $header_txt=utf8_encode(header_txt($this->db));
while ( !feof($p_file) )
{
@@ -656,7 +656,8 @@ class Acc_Bilan
ob_start();
// save the file in a temp folder
// create a temp directory in /tmp to unpack file and to parse it
- $dirname=tempnam($_ENV['TMP'].DIRECTORY_SEPARATOR.'tmp','bilan_');
+ // bug PHP 7 tempnam throw a notice
+ $dirname=@tempnam($_ENV['TMP'].DIRECTORY_SEPARATOR.'tmp','bilan_');
unlink($dirname);
- [Noalyss-commit] [noalyss] branch master updated (ce0a8f8 -> 79ecb68), Dany De Bontridder, 2021/02/05
- [Noalyss-commit] [noalyss] 01/15: Fix #0001277: <<header>> ne supporte pas caractères avec accent.,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 03/15: Cosmetic, Dany De Bontridder, 2021/02/05
- [Noalyss-commit] [noalyss] 02/15: SQL upgrade, Dany De Bontridder, 2021/02/05
- [Noalyss-commit] [noalyss] 06/15: Fix: bug in gettext function, Dany De Bontridder, 2021/02/05
- [Noalyss-commit] [noalyss] 05/15: New 0001893: Date remplacement auto des séparateurs, Dany De Bontridder, 2021/02/05
- [Noalyss-commit] [noalyss] 09/15: Set Version 8.1 + logo + bug SQL script 151, Dany De Bontridder, 2021/02/05
- [Noalyss-commit] [noalyss] 12/15: Compatibility PHP7.0, Dany De Bontridder, 2021/02/05
- [Noalyss-commit] [noalyss] 04/15: New : 0001890: Avertissement si la document à télécharger est trop gros, on ne peut soumettre le fichier, Dany De Bontridder, 2021/02/05
- [Noalyss-commit] [noalyss] 07/15: ICard Improve doc and test, Dany De Bontridder, 2021/02/05
- [Noalyss-commit] [noalyss] 08/15: New : Task #1894: Gestion : ajout un champs paramétrable pour videoconf, Dany De Bontridder, 2021/02/05
- [Noalyss-commit] [noalyss] 11/15: Fix : Menu problem when 2 duplicate menus, Dany De Bontridder, 2021/02/05