]> git.nbdom.net Git - nb.git/commitdiff
sqlite dirs
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 14 Sep 2016 16:09:04 +0000 (18:09 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 14 Sep 2016 16:09:04 +0000 (18:09 +0200)
bin/dbq-dir2sqlite
etc/dbs.php
etc/dbs/nb.php

index a3857fea9015382baaebac1d54350bf58731be99..c0699e99a43041c81c362768985f6884552ef3d8 100755 (executable)
@@ -138,7 +138,7 @@ for vars in $(dbq a=ls type='!sqlite' out=sh); do
   mv "$TMP_DB" "$id.db"
   cat <<EOF > "$id.php"
 <?php
-\$CONF['sqlite-$id'] = [
+\$CONF['$id-sqlite'] = [
   'type' => 'sqlite',
   'host' => '$id.db',
   'title' => 'created by $NAME',
index ac3880f92f006173890750a3028b7476fe663dc4..7f6460b325b456d5e026c0f242eae6f11ded60bf 100644 (file)
@@ -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
     ];
   }
 }
index d5f933f674c662f7cc4d3c8363ae74dfb83dc977..4a27e85228bf2f48c5fd5a53f9190ab01c53e005 100644 (file)
@@ -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;