_mysql:
type: mysql
-crypt:
- type: sqlite
- host: /dev/shm/crypt.db
-
-rt:
- type: pgsql
- host: db.rt.semantico.net
- name: rtdb
- user: rtuser
- title: 'RT'
-
izi:
title: Izi Admin
host: admin.izideal.vpn
#user: nico
_import:
- izi
+
+crypt:
+ type: sqlite
+ host: /dev/shm/crypt.db
$DBQ['_ui'] = array(
'title' => 'Semantico UI',
'type' => 'sqlite',
- 'host' => (file_exists('/opt/www/sem_ui/var/db/semantico.db') ? '/opt/www/sem_ui/var/db/semantico.db' : "$DIR_SQLITE/semantico.db"),
+ 'host' => (file_exists('/opt/www/sem_ui/var/db/semantico.db') ? '/opt/www/sem_ui/var/db/semantico.db' : "$DIR_SQLITE/semantico.sqlite"),
'default_table' => 'node',
'tables' => array(
$sql = $this->method('tables');
- foreach ($this->conn->query($sql,PDO::FETCH_ASSOC) as $row) {
- #debug($row);
- $name = current($row);
- $this->table($name,$row+['status'=>$row]); # add to this->tables too !
+ if ($sql and !empty($this->conn)) {
+ foreach ($this->conn->query($sql,PDO::FETCH_ASSOC) as $row) {
+ #debug($row);
+ $name = current($row);
+ $this->table($name,$row+['status'=>$row]); # add to this->tables too !
+ }
}
}
$this->databases = [];
$name = self::p('name','');
- if ($sql = $this->conf_type('databases')) {
+ if ($sql = $this->conf_type('databases') and !empty($this->conn)) {
$fct = '';
if (is_array($sql)) list($sql,$fct) = count($sql)>1 ? $sql : [$sql[0],''];