_import:
- izi
-media:
- host: ks358898.izideal.vpn
- name: mysql
- type: mysql
- _import:
- - _nico
-
postfix:
- #pdo: 'mysql:host=media.izideal.vpn;port=3306;dbname=postfix'
title: Postfix on Izideal
- host: media.izideal.vpn
+ host: mail.izideal.vpn
user: postfix
type: mysql
$attr['_no_connect'] = true;
$attr['id'] = $id;
$d = new Db($attr);
- if (!empty($name) and !$this->str_match($d->name,$name)) continue;
- if (!empty($type) and !$this->str_match($d->type,$type)) continue;
+ #debug([$d->id,$d::$type]);
$db = [];
foreach ($fields as $k) {
- if (!isset($d->$k)) continue; $db[$k] = $d->$k;
+ #if (isset($d::$k)) $db[$k] = $d::$k;
+ if ($k=='type' and isset($d::$type)) $db[$k] = $d::$type;
+ elseif (isset($d->$k)) $db[$k] = $d->$k;
}
+ if (!empty($name) and !$this->str_match($db['name'],$name)) continue;
+ if (!empty($type) and !$this->str_match($db['type'],$type)) continue;
+
$dbs[] = $db;
}
#return false;
# Test if type exists because of a bug from shell.php
- if ($this->db()->type) $this->fields();
+# NB 30.08.16 if ($this->db()->type) $this->fields();
+ #$db = $this->db();
+ #if ($db::$type) $this->fields();
foreach ($extras as $k => $v) {