From c8375d17baf42e118766085e94704194d5fa0264 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 14 Dec 2017 21:34:18 +0000 Subject: [PATCH] www/dbq/dbq.php --- www/dbq/dbq.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index 36ad8bd0..462c750c 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -367,7 +367,8 @@ class DbQ extends nb { $fields = $this->vi_extract_fields(); - $values = $add ? array_fill(0,count($keys),'') : explode($this->param_args_sep,$this->params['args']); + $values = ($_SERVER['REQUEST_METHOD'] == 'POST') ? $_POST : explode($this->param_args_sep,$this->params['args']); + $values = $add ? array_fill(0,count($keys),'') : $values; $values = array_combine($keys,$values); # NB 23.11.17: Handle format for /vi/ @@ -413,9 +414,18 @@ class DbQ extends nb { $args = $GLOBALS['dbq_args']; + if (1) { $r = ['view' => join(' ',[ 'View' ]) ] + $r; + } else { + $r = ['view' => join(' ',['' + .'
' + .'View' + .$this->form_hidden($r) + .'
' + ]) ] + $r; + } if ($this->perm < self::DELETE) return; if ($this->db->type == 'sqlite' and !is_writeable($this->db->host)) return; -- 2.47.3