From: Devops Date: Wed, 31 May 2017 11:13:23 +0000 (+0100) Subject: lib/php/db/table.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=d4f381955a83c33ef5634a0591c01120997df86c;p=nb.git lib/php/db/table.php --- diff --git a/lib/php/db/table.php b/lib/php/db/table.php index e7704c6d..7b7acb62 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -266,7 +266,7 @@ Class Table extends nb { ; } - $indexes = [];#$this->db()->conf_type('table.sql.index',false); + $indexes = []; foreach ($this->indexes() as $i) { if (!empty($i['unique']) or !empty($i['key'])) continue; $indexes[] = 'CREATE INDEX '.$i['name'].' ON '.$this->sql_name().' ('.$i['field'].')'; @@ -866,7 +866,7 @@ Class Table extends nb { public function buttons() { if (!$this->show_buttons or empty(self::$params)) return false; - if ($this->type() != 'table') return false; + if (!preg_match('/(table|view)/',$this->type())) return false; return true; }