From e5b24dcd5a8e21d050ab4ee72096ce513cbca474 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 1 Dec 2016 16:41:54 +0000 Subject: [PATCH] db::config --- lib/php/db.php | 2 -- lib/php/db/config.php | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/php/db.php b/lib/php/db.php index f30373c9..f13b6f49 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -666,11 +666,9 @@ class Db extends nb { $file = self::untilde($file); - #if (!is_readable($file)) if (!is_readable($file)) continue; if (preg_match('/\.(yaml|yml)$/i',$file) and ($yaml = self::yaml_parse_file($file))) { $dbs = array_replace_recursive($dbs,$yaml); - #If (!empty($dbs['crypt'])) debug($dbs['crypt']); } elseif (preg_match('/\.php$/i',$file)) { require($file); diff --git a/lib/php/db/config.php b/lib/php/db/config.php index e3983d4f..a5c4f1ba 100644 --- a/lib/php/db/config.php +++ b/lib/php/db/config.php @@ -29,8 +29,13 @@ $DB_CONFS = array_merge([] '~/.dbq.yaml', '~/.dbq.php', ] + ,(array)glob($_ENV['HOME'].'/.dbq/*.yml') + ,(array)glob($_ENV['HOME'].'/.dbq/*.yaml') + ,(array)glob($_ENV['HOME'].'/.dbq/*.php') ); + #bye($DB_CONFS); $DB_CONFS = Db::conf_load($DB_CONFS); +#bye(array_keys($DB_CONFS)); ?> -- 2.47.3