);
if (strpos(php_uname("n"),'ovh.net')!==false) $CONF['nb']['order'] = 1;
-$CONF['nb-sqlite'] = array (
+if (!empty($DIR_SQLITE)) $CONF['nb-sqlite'] = array (
'host' => "$DIR_SQLITE/nb.db",
'type' => 'sqlite',
'_import' => '_nb',
# Load all files into a $h if #files is not a hash
$h = [];
- if (is_scalar($files)) $files = array($files);
+ if (is_scalar($files)) $files = array($files);
foreach ($files as $file) {
if (!is_readable($file)) continue;
* @copyright NB 12.08.16
* Return a db hash to create a new instance from $conf
*/
- public static function conf_search_db($conf) {
+ public static function conf_search_db($conf,$id=null) {
- $id = self::p('db');
+ if (empty($id)) $id = self::p('db');
# Load databases
$conf = self::is_hash($conf) ? $conf : self::conf_load($conf);
'id' => $id,
));
- # Search table
- #$table = Db::p('table');
-
return $db;
}