]> git.nbdom.net Git - nb.git/commitdiff
db::config
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 1 Dec 2016 16:41:54 +0000 (16:41 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 1 Dec 2016 16:41:54 +0000 (16:41 +0000)
lib/php/db.php
lib/php/db/config.php

index f30373c9b0a269b819652b4ca5c1f31d8b435a9e..f13b6f496c8d15fbf6a082af9071623e0d024329 100644 (file)
@@ -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);
index e3983d4f904b366d87797f44a7cf865d8c8e906d..a5c4f1ba65bc8a7b4c92b30702c98e93fd142abd 100644 (file)
@@ -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));
 
 ?>