]> git.nbdom.net Git - nb.git/commitdiff
fix bugs for ui
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 7 Sep 2016 16:23:25 +0000 (18:23 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 7 Sep 2016 16:23:25 +0000 (18:23 +0200)
etc/dbs/ui.php
lib/php/db/table.php

index 6790edb322ea93fc6090b287d05b39cd60e153e5..a11a5d71b0fab3a62fdf2254d75edcaa7f7c4f35 100644 (file)
@@ -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) {
index aeae87c00b650403e8f81509bf1f613f484812de..2a3afd0272cfbc33e51a61bc522e9b8dd29269b9 100644 (file)
@@ -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++;
       }