From: Devops Date: Tue, 18 Apr 2017 13:51:01 +0000 (+0100) Subject: lib/php/db/table.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=73aef33eb6861bc15e9f07e95ee8362451acd14b;p=nb.git lib/php/db/table.php --- diff --git a/lib/php/db/field.php b/lib/php/db/field.php index e1eae9e1..29a3fb9a 100644 --- a/lib/php/db/field.php +++ b/lib/php/db/field.php @@ -77,6 +77,7 @@ class field extends nb { $size = ($this->size() and is_scalar($this->size())) ? $this->size() : 0; $tag = ( ($size>$this->textarea_size) or preg_match('/^(text|binary|blob)/i',$this->type) ) ? 'textarea' : 'input'; + return '
' .($this->extras ? ''.$this->out($value).'' diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 66149207..9ca09082 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -525,7 +525,7 @@ Class Table extends nb { foreach ($fields as $name => $field) { - if ($add and !preg_match('/^(null)?$/',$field->default)) { + if ($add and !preg_match('/^(null)?$/',strtolower($field->default))) { $row[$name] = $field->default; } elseif(!isset($row[$name])) {