From 9db5b6987e7d5ae95b4cc309f5c18918d7dc5a17 Mon Sep 17 00:00:00 2001 From: Damien <damien.burel@maarch.org> Date: Thu, 7 Feb 2019 11:18:36 +0100 Subject: [PATCH] FIX bad code --- core/class/class_functions.php | 2 +- modules/fileplan/class/class_modules_tools_Abstract.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/class/class_functions.php b/core/class/class_functions.php index ee0e20c8e72..f4a0e66fa1a 100755 --- a/core/class/class_functions.php +++ b/core/class/class_functions.php @@ -735,7 +735,7 @@ class functions * Returns a string without the escaping characters * * @param $string string String to format - * @return Formated string + * @return string */ public static function show_string($string, $replace_CR = false, $chars_to_escape = array(), $databasetype = '', $escape_quote = true) { diff --git a/modules/fileplan/class/class_modules_tools_Abstract.php b/modules/fileplan/class/class_modules_tools_Abstract.php index 5ec37f2a7ae..b483ff871f5 100755 --- a/modules/fileplan/class/class_modules_tools_Abstract.php +++ b/modules/fileplan/class/class_modules_tools_Abstract.php @@ -455,7 +455,8 @@ abstract class fileplan_Abstract protected function _getChildrensTree($fileplan_id, $positions, $parent = '', $tabspace = '') { $db = new Database(); - if (functions::protect_string_db(trim($parent)) == '') { + $f = new functions(); + if ($f->protect_string_db(trim($parent)) == '') { $stmt = $db->query( "select position_id, position_label, parent_id, count_document from " @@ -482,7 +483,7 @@ abstract class fileplan_Abstract $positions, array( 'ID' =>$line->position_id, - 'LABEL' => $espace.functions::show_string($line->position_label), + 'LABEL' => $espace. $f->show_string($line->position_label), 'PARENT_ID' =>$line->parent_id, 'COUNT_DOCUMENT' => $line->count_document ) -- GitLab