From: Nicolas Boisselier Date: Tue, 30 Aug 2016 11:27:11 +0000 (+0200) Subject: fix bug with type X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=182e827b95ed638150520d789068aab85761e7f1;p=nb.git fix bug with type --- diff --git a/lib/php/db.php b/lib/php/db.php index 2bf972f2..2a72fe18 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -301,6 +301,7 @@ class Db extends nb { public static function type($key=null,$die=false,$type=null) { global $DB_TYPES; if (!$type) $type = self::$type; + if ($key == 'type') return $type; # Load php file static $require = array(); diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 79fde1c6..ed5c122e 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -633,9 +633,7 @@ Class Table extends nb { #return false; # Test if type exists because of a bug from shell.php -# NB 30.08.16 if ($this->db()->type) $this->fields(); - #$db = $this->db(); - #if ($db::$type) $this->fields(); +# NB 30.08.16 if ($this->db()->type('type')) $this->fields(); foreach ($extras as $k => $v) { @@ -1051,8 +1049,7 @@ Class Table extends nb { public function rows_begin_xml() { return '' .''.NB_EOL #db()->name.'" table="'.$this->name.'" type="'.$this->db()->type.'">'.NB_EOL - .''.NB_EOL + .''.NB_EOL ; }