From: root Date: Mon, 7 Aug 2017 23:30:09 +0000 (+0100) Subject: lib/php/db/table.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=91bb920cdd6a5f68a4f17c3fa4c6f92f2f0e31a9;p=nb.git lib/php/db/table.php --- diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 2f376b4f..4184b43a 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -2107,7 +2107,7 @@ Class Table extends nb { $this->create_temporary(); $sql = $this->db()->method('tables'); - if (!self::p('count')) $sql .= " LIMIT 0"; + if (!$this->p('count')) $sql .= " LIMIT 0"; $sql = "SELECT * FROM ($sql) t WHERE name=".$this->db()->quote($this->name); $sth = $this->db()->conn->query($sql,PDO::FETCH_ASSOC); @@ -2122,7 +2122,6 @@ Class Table extends nb { 'name', 'type', ] as $k) { -# NB 28.10.16 if (!empty($this->$k) and empty($this->status[$k])) $this->status[$k] = $this->$k; if (!empty($this->$k)) $this->status[$k] = $this->$k; } @@ -2145,9 +2144,11 @@ Class Table extends nb { # NB 08.08.17 if (!empty($this->status[$k])) continue; if (empty($key)) { - if (!self::p($k)) continue; + if (!$this->p($k)) continue; + } elseif(is_array($key)) { if (!in_array($k,$key)) continue; + } else { if ($k!=$key) continue; }