From 4f4920234729fdadc318f780f3659587a69d4360 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 4 Jan 2018 23:18:31 +0000 Subject: [PATCH] lib/php/db/config.php --- etc/dbq/000-local.php | 14 -------------- etc/dbq/nb.php | 11 +++++++++++ ...{zzz-all.php.disable => sqlite-all.php.disable} | 0 etc/dbq/{zz-sqlite.php.disable => sqlite-dir.php} | 13 ++++--------- lib/php/db/config.php | 1 + 5 files changed, 16 insertions(+), 23 deletions(-) delete mode 100644 etc/dbq/000-local.php create mode 100644 etc/dbq/nb.php rename etc/dbq/{zzz-all.php.disable => sqlite-all.php.disable} (100%) rename etc/dbq/{zz-sqlite.php.disable => sqlite-dir.php} (74%) diff --git a/etc/dbq/000-local.php b/etc/dbq/000-local.php deleted file mode 100644 index 412871ca..00000000 --- a/etc/dbq/000-local.php +++ /dev/null @@ -1,14 +0,0 @@ - [ - 'type' => 'sqlite', - 'name' => 'Nb', - 'default_table' => 'mime', - 'host' => nb::ROOT_DIR.'/share/db/nb.db', - ], - -]; -?> diff --git a/etc/dbq/nb.php b/etc/dbq/nb.php new file mode 100644 index 00000000..f6c4f6fc --- /dev/null +++ b/etc/dbq/nb.php @@ -0,0 +1,11 @@ + 'sqlite', + 'name' => 'Nb', + 'default_table' => 'mime', + 'host' => nb::ROOT_DIR.'/share/db/nb.db', +]; +?> diff --git a/etc/dbq/zzz-all.php.disable b/etc/dbq/sqlite-all.php.disable similarity index 100% rename from etc/dbq/zzz-all.php.disable rename to etc/dbq/sqlite-all.php.disable diff --git a/etc/dbq/zz-sqlite.php.disable b/etc/dbq/sqlite-dir.php similarity index 74% rename from etc/dbq/zz-sqlite.php.disable rename to etc/dbq/sqlite-dir.php index 0fbd1a06..f371d00a 100644 --- a/etc/dbq/zz-sqlite.php.disable +++ b/etc/dbq/sqlite-dir.php @@ -1,18 +1,15 @@ $db) { if (1 @@ -42,6 +39,4 @@ foreach ([ } } - -unset($DIR_SQLITE,$host_already_exists); ?> diff --git a/lib/php/db/config.php b/lib/php/db/config.php index df5dd195..3ac6562a 100644 --- a/lib/php/db/config.php +++ b/lib/php/db/config.php @@ -2,6 +2,7 @@ require_once(realpath(dirname(__FILE__).'/../config.php')); require_once(NB_ROOT.'/lib/php/db.php'); if (empty($_SERVER['HOME'])) $_SERVER['HOME'] = ''; +if (empty($DBQ)) $DBQ = []; $DB_CONFS = array_merge([], # ::ROOT_DIR -- 2.47.3