]> git.nbdom.net Git - nb.git/commitdiff
www/dbq/dbq.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 3 Feb 2018 04:55:06 +0000 (04:55 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 3 Feb 2018 04:55:06 +0000 (04:55 +0000)
lib/php/db/table.php
www/dbq/dbq.php

index 20c3fe339f02f1461b4525957300ac8b99cd57c5..1e2ca52ff6fab7e326500400b9347a6da4adbb5c 100644 (file)
@@ -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']) {
index b336d6253c501238e63be5a4bfc50c788349e6b0..04140e3773988d28a76560282b7a0a5021e6d705 100644 (file)
@@ -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'].'"');
                        });