From 91bb920cdd6a5f68a4f17c3fa4c6f92f2f0e31a9 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 8 Aug 2017 00:30:09 +0100 Subject: [PATCH] lib/php/db/table.php --- lib/php/db/table.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; } -- 2.47.3