From 73aef33eb6861bc15e9f07e95ee8362451acd14b Mon Sep 17 00:00:00 2001 From: Devops Date: Tue, 18 Apr 2017 14:51:01 +0100 Subject: [PATCH] lib/php/db/table.php --- lib/php/db/field.php | 1 + lib/php/db/table.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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])) { -- 2.47.3