From a7e833280954a537e12d5a3f4fa12a5b9e8412da Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sat, 14 Jun 2014 08:58:33 +0200 Subject: Improve system of queries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Coding style - More checks server side - Default query name is "Query n°X" - List of queries is moved into nav_menu, in a dropdown - Better system to remove fields in JS (to a.remove elements, give an attibute data-remove="id_to_remove") - Fix a bug in lib/Mine/Request.php (htmlspecialchars_utf8 can be applied on arrays now) - Few theme improvements - Add an element .no-mobile to apply to elements which should not appear on mobiles See https://github.com/marienfressinaud/FreshRSS/pull/498 --- lib/Minz/Request.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php index 7e3c59990..755784522 100644 --- a/lib/Minz/Request.php +++ b/lib/Minz/Request.php @@ -28,6 +28,9 @@ class Minz_Request { return self::$params; } static function htmlspecialchars_utf8 ($p) { + if (is_array($p)) { + return array_map('self::htmlspecialchars_utf8', $p); + } return htmlspecialchars($p, ENT_COMPAT, 'UTF-8'); } public static function param ($key, $default = false, $specialchars = false) { @@ -35,8 +38,6 @@ class Minz_Request { $p = self::$params[$key]; if(is_object($p) || $specialchars) { return $p; - } elseif(is_array($p)) { - return array_map('self::htmlspecialchars_utf8', $p); } else { return self::htmlspecialchars_utf8($p); } -- cgit v1.2.3