]> git.nbdom.net Git - nb.git/commitdiff
lib/php/db/table.php
authorDevops <sys@15gifts.com>
Wed, 31 May 2017 11:13:23 +0000 (12:13 +0100)
committerDevops <sys@15gifts.com>
Wed, 31 May 2017 11:13:23 +0000 (12:13 +0100)
lib/php/db/table.php

index e7704c6d09f7260be01c7f21c73c89d8c16fc21d..7b7acb62c7ff6161870cddaa08684b0cdfce4ba7 100644 (file)
@@ -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;
   }