From 856d2c125b1592df0f98a141f3de599c5089ce02 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 28 Dec 2013 18:07:16 +0100 Subject: Suite nettoyage des types et chaînes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contribue à https://github.com/marienfressinaud/FreshRSS/issues/260 --- lib/Minz/Configuration.php | 2 +- lib/Minz/ModelArray.php | 21 ++------------------- 2 files changed, 3 insertions(+), 20 deletions(-) (limited to 'lib') diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php index fc0a4c2c1..306328904 100644 --- a/lib/Minz/Configuration.php +++ b/lib/Minz/Configuration.php @@ -77,7 +77,7 @@ class Minz_Configuration { return self::$use_url_rewriting; } public static function title () { - return stripslashes(self::$title); + return self::$title; } public static function language () { return self::$language; diff --git a/lib/Minz/ModelArray.php b/lib/Minz/ModelArray.php index bf2c4cb40..89d7f06c1 100644 --- a/lib/Minz/ModelArray.php +++ b/lib/Minz/ModelArray.php @@ -37,10 +37,8 @@ class Minz_ModelArray { if ($this->array === false) { throw new Minz_PermissionDeniedException($this->filename); - } elseif (is_array($this->array)) { - $this->array = $this->decodeArray($this->array); - } else { - $this->array = array (); + } elseif (!is_array($this->array)) { + $this->array = array(); } } } @@ -55,21 +53,6 @@ class Minz_ModelArray { return true; } - //TODO: check if still useful, and if yes, use a native function such as array_map - private function decodeArray ($array) { - $new_array = array (); - - foreach ($array as $key => $value) { - if (is_array ($value)) { - $new_array[$key] = $this->decodeArray ($value); - } else { - $new_array[$key] = stripslashes ($value); - } - } - - return $new_array; - } - private function getLock() { $handle = fopen($this->filename, 'r'); if ($handle === false) { -- cgit v1.2.3