From 9efc2f72227889e87b6dbfe21d1f8ec1cedb72ea Mon Sep 17 00:00:00 2001 From: Florian Azizian <florian.azizian@maarch.org> Date: Wed, 10 Sep 2014 14:59:34 +0000 Subject: [PATCH] =?UTF-8?q?FIX=20#1538=20les=20;=20sont=20remplac=C3=A9s?= =?UTF-8?q?=20par=20des=20espaces.=20En=20lien=20avec=20le=20tickets=20#14?= =?UTF-8?q?91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/trunk/core/class/class_functions.php | 10 ++++++---- core/trunk/core/class/class_history.php | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/trunk/core/class/class_functions.php b/core/trunk/core/class/class_functions.php index deff8a5ad3e..37e9901d61c 100644 --- a/core/trunk/core/class/class_functions.php +++ b/core/trunk/core/class/class_functions.php @@ -906,7 +906,7 @@ class functions * @param $string string String to format * @return Formated date */ - public function protect_string_db($string, $databasetype = '') + public function protect_string_db($string, $databasetype = '', $full='yes') { if (isset($_SESSION['config']['databasetype']) && !empty($_SESSION['config']['databasetype'])) { @@ -925,9 +925,11 @@ class functions $string = pg_escape_string($string); } - $string=str_replace(';', ' ', $string); - $string=str_replace('--', '-', $string); - + if ($full == 'yes') { + $string=str_replace(';', ' ', $string); + $string=str_replace('--', '-', $string); + } + return $string; } diff --git a/core/trunk/core/class/class_history.php b/core/trunk/core/class/class_history.php index c3f90d54ee5..7ccf17bbaac 100644 --- a/core/trunk/core/class/class_history.php +++ b/core/trunk/core/class/class_history.php @@ -160,7 +160,8 @@ class history extends dbquery $info = $this->protect_string_db( $info, - $databasetype + $databasetype, + 'no' ); if (!$isTech) { -- GitLab