From: Nicolas Boisselier Date: Sat, 3 Feb 2018 04:55:06 +0000 (+0000) Subject: www/dbq/dbq.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=35acaa209ece869090abc1579ae4a5ee957b00a8;p=nb.git www/dbq/dbq.php --- diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 20c3fe33..1e2ca52f 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -1133,7 +1133,7 @@ Class Table extends nb { ; if ($opt['is_html'] and !empty(self::$params) and !$this->p('action') and !$this->p('inc')) { - echo $this->html_menu($opt); + #echo $this->html_menu($opt); } if ($opt['is_html']) { diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index b336d625..04140e37 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -528,7 +528,12 @@ class DbQ extends nb { ); if ($this->perm < self::DELETE) return; - if ($this->db->type == 'sqlite' and !is_writeable($this->db->host)) return; + static $delete = 1; + if (empty($delete)) { + $delete = ($this->db->type == 'sqlite' and !is_writeable($this->db->host)); + } + if (!delete) return; +# NB 03.02.18 if ($this->db->type == 'sqlite' and !is_writeable($this->db->host)) return; $rm = $this->uri_add_referer($this->table->base.'/rm'); $r['delete'] = '' @@ -1125,6 +1130,7 @@ EOF; } elseif ($action == 'ls') { $this->page($this->db,'ls',[],function(&$r){ + if ($this->perm < self::ADMIN) unset($r['host'],$r['type']); $r['id'] = $this->page->tag('a',$r['id'],'href="'.$this->db->base.'/'.$r['id'].'"'); });