From: Nicolas Boisselier Date: Wed, 7 Sep 2016 16:23:25 +0000 (+0200) Subject: fix bugs for ui X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=831a1c55c91fd2891e1c117a5bd294176dcb16f1;p=nb.git fix bugs for ui --- diff --git a/etc/dbs/ui.php b/etc/dbs/ui.php index 6790edb3..a11a5d71 100644 --- a/etc/dbs/ui.php +++ b/etc/dbs/ui.php @@ -2,7 +2,7 @@ $CONF['_ui'] = array( 'title' => 'Semantico UI', 'type' => 'sqlite', - 'host' => '/opt/www/sem_ui/var/db/semantico.db', + 'host' => (file_exists('/opt/www/sem_ui/var/db/semantico.db') ? '/opt/www/sem_ui/var/db/semantico.db' : "$DIR_SQLITE/ui.db"), 'default_table' => 'node', 'sql_replace' => function($sql) { diff --git a/lib/php/db/table.php b/lib/php/db/table.php index aeae87c0..2a3afd02 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -847,7 +847,7 @@ Class Table extends nb { $count_fields = 0; foreach ($this->fields() as $f => $field) { - $row[$f] = $field->out($row[$f]); + $row[$f] = $field->out(isset($row[$f]) ? $row[$f] : ''); $count_fields++; }