From 36d4e724b03906b832e4cd13ecca06190e478437 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 14 Sep 2016 18:09:04 +0200 Subject: [PATCH] sqlite dirs --- bin/dbq-dir2sqlite | 2 +- etc/dbs.php | 5 +++-- etc/dbs/nb.php | 6 ------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/bin/dbq-dir2sqlite b/bin/dbq-dir2sqlite index a3857fea..c0699e99 100755 --- a/bin/dbq-dir2sqlite +++ b/bin/dbq-dir2sqlite @@ -138,7 +138,7 @@ for vars in $(dbq a=ls type='!sqlite' out=sh); do mv "$TMP_DB" "$id.db" cat < "$id.php" 'sqlite', 'host' => '$id.db', 'title' => 'created by $NAME', diff --git a/etc/dbs.php b/etc/dbs.php index ac3880f9..7f6460b3 100644 --- a/etc/dbs.php +++ b/etc/dbs.php @@ -49,13 +49,14 @@ if ($DIR_SQLITE) { continue; } - $id = 'sqlite-'.basename($file,'.db'); + $name = basename($file,'.db'); + $id = "$name-sqlite"; $CONF[$id] = [ 'host' => "$DIR_SQLITE/$file", 'type' => 'sqlite', 'title' => 'created by dbs.php', - #'_import' => basename($file,'.db'), + '_import' => $name ]; } } diff --git a/etc/dbs/nb.php b/etc/dbs/nb.php index d5f933f6..4a27e852 100644 --- a/etc/dbs/nb.php +++ b/etc/dbs/nb.php @@ -10,12 +10,6 @@ $CONF['nb'] = array( ); if (strpos(php_uname("n"),'ovh.net')!==false) $CONF['nb']['order'] = 1; -if (!empty($DIR_SQLITE)) $CONF['nb-sqlite'] = array ( - 'host' => "$DIR_SQLITE/nb.db", - 'type' => 'sqlite', - '_import' => '_nb', -); - /***************************************************************************** if ($LOCAL_DB and !empty($CONF['nb-sqlite']) and isset($CONF['nb']['order'])) { $CONF['nb-sqlite']['order'] = isset($CONF['nb']['order']) ? $CONF['nb']['order'] : 1; -- 2.47.3