]> git.nbdom.net Git - nb.git/commitdiff
www/dbq/dbq.php
authorroot <sys@15gifts.com>
Thu, 27 Jul 2017 15:29:02 +0000 (16:29 +0100)
committerroot <sys@15gifts.com>
Thu, 27 Jul 2017 15:29:02 +0000 (16:29 +0100)
www/dbq/dbq.php

index 64d61ab2a80387efae6d15a18fe2d476e169a712..ecf9834c14c4a7d3e780c9bab5ed8a5716716f2a 100644 (file)
@@ -11,14 +11,14 @@ class DbQ extends nb {
   const ADMIN = 9;
   const DELETE = 4;
   const WRITE = 3;
-  const VIEW = 1;
+  const READ = 1;
   public $perm = self::ADMIN;
   public $perms = [ # keys in lowercase !!!!
     'admin' => self::ADMIN,
     'delete' => self::DELETE,
     'write' => self::WRITE,
-# NB 27.07.17     'view' => self::VIEW,
-    'read' => self::VIEW,
+# NB 27.07.17     'view' => self::READ,
+    'read' => self::READ,
   ];
 
   public $title = 'Dbq';
@@ -280,7 +280,7 @@ class DbQ extends nb {
 
   public function table_rw() {
     return (1
-      and ($this->perm >= self::VIEW)
+      and ($this->perm >= self::READ)
       and !empty($this->table)
         and ( strpos('table view',$this->table->type()) !== false )
     );
@@ -478,7 +478,7 @@ class DbQ extends nb {
     if (empty($_SERVER['SERVER_PROTOCOL'])) $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0';
     header($_SERVER['SERVER_PROTOCOL'].' '.$msg);
     echo "$msg\n";
-    if (!empty($admin_msg) and $this->perm >= self::VIEW) echo "$admin_msg\n";
+    if (!empty($admin_msg) and $this->perm >= self::READ) echo "$admin_msg\n";
     exit;
   }