From 79ac2bbc5f914ade8421c921cb72b0b3d9faa1c8 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Fri, 5 Jan 2018 04:04:30 +0000 Subject: [PATCH] www/dbq/dbq.php --- www/dbq/dbq.php | 21 ++++++++++++++++----- www/dbq/html/default.css | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index 51776000..66a6528b 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -450,14 +450,14 @@ class DbQ extends nb { 'row_parse_post' => function(&$r){ $args = $GLOBALS['dbq_args']; - $_r = $r; + $hidden = $this->form_hidden($r); - $r = array_merge(['view' => '' + $r = $this->ar_unshift($r,'view','' .'
' .'View' - .$this->form_hidden($_r) + .$hidden .'
' - ],$r); + ); if ($this->perm < self::DELETE) return; if ($this->db->type == 'sqlite' and !is_writeable($this->db->host)) return; @@ -466,7 +466,7 @@ class DbQ extends nb { $r['delete'] = '' .'
' .'Delete' - .$this->form_hidden($_r) + .$hidden .'
' ; @@ -477,8 +477,19 @@ class DbQ extends nb { unset($GLOBALS['dbq_args']); } + private function ar_unshift( array & $array, $key, $val) { +# NB 05.01.18: Escape html ??????? we use reverse +# NB 05.01.18 return $array + [ $key => $val ]; + $array = array_reverse($array, 1); + $array[$key] = $val; + $array = array_reverse($array, 1); + + return $array; + } public static function uri_add_referer($rm) { + + if (isset($_SERVER['REQUEST_URI'])) { $rm .= (strpos($rm,'?') ? '' : '?') . 'referer=' . urlencode($_SERVER['REQUEST_URI']); } diff --git a/www/dbq/html/default.css b/www/dbq/html/default.css index d9d555c0..3242108b 100644 --- a/www/dbq/html/default.css +++ b/www/dbq/html/default.css @@ -273,6 +273,7 @@ form.menu .criterias span.label { margin: 0.2em 0.2em 0 0; border-radius: 3px; } + form.menu .criterias span.label:last-child { border-right: none; } -- 2.47.3