summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-06-14 08:58:33 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-06-14 09:04:31 +0200
commita7e833280954a537e12d5a3f4fa12a5b9e8412da (patch)
treea6705f67a706f3ee9e427e0dcd1d108b0ee64ef0 /lib
parent2b8dc666345d334f50bf2f4f32f0b127edb40c3a (diff)
Improve system of queries
- 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
Diffstat (limited to 'lib')
-rw-r--r--lib/Minz/Request.php5
1 files changed, 3 insertions, 2 deletions
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);
}