]> git.mxchange.org Git - core.git/commitdiff
renamed lib-local.php -> lib-lfdb.php because it really loads the "legendary"
authorRoland Haeder <roland@mxchange.org>
Sun, 26 Feb 2017 13:08:47 +0000 (14:08 +0100)
committerRoland Haeder <roland@mxchange.org>
Tue, 28 Feb 2017 21:10:04 +0000 (22:10 +0100)
local file database class.

Signed-off-by: Roland Häder <roland@mxchange.org>
inc/config.php
inc/database.php
inc/database/lib-lfdb.php [new file with mode: 0644]
inc/database/lib-local.php [deleted file]

index bd6ef83354f62a5e4054316428660d4290ccb91d..645c8a5eaee80868eabb75b4d30c259e99d9fee2 100644 (file)
@@ -43,7 +43,7 @@ $cfg->setConfigEntry('base_path', ApplicationEntryPoint::detectCorePath() . '/')
 $cfg->setConfigEntry('base_url', $cfg->detectBaseUrl());
 
 // CFG: DATABASE-TYPE
 $cfg->setConfigEntry('base_url', $cfg->detectBaseUrl());
 
 // CFG: DATABASE-TYPE
-$cfg->setConfigEntry('db_type', 'local');
+$cfg->setConfigEntry('db_type', 'lfdb');
 
 // CFG: LOCAL-DB-PATH
 $cfg->setConfigEntry('local_db_path', $cfg->getConfigEntry('base_path') . 'db/');
 
 // CFG: LOCAL-DB-PATH
 $cfg->setConfigEntry('local_db_path', $cfg->getConfigEntry('base_path') . 'db/');
index 01ab8471d4ee37dfe52b45ca1b5d86c92d20c9e7..c54d1d9c6880780dbf71d5ab585aba1d120c8a85 100644 (file)
@@ -34,7 +34,11 @@ use CoreFramework\Middleware\Debug\DebugMiddleware;
 $databaseInstance = NULL;
 
 // Generate FQFN for the database layer
 $databaseInstance = NULL;
 
 // Generate FQFN for the database layer
-$fqfn = FrameworkConfiguration::getSelfInstance()->getConfigEntry('base_path') . 'inc/database/lib-' . FrameworkConfiguration::getSelfInstance()->getConfigEntry('db_type') . '.php';
+$fqfn = sprintf(
+       '%sinc/database/lib-%s.php',
+       FrameworkConfiguration::getSelfInstance()->getConfigEntry('base_path'),
+       FrameworkConfiguration::getSelfInstance()->getConfigEntry('db_type')
+);
 
 // Load the database layer include
 if (BaseFrameworkSystem::isReadableFile($fqfn)) {
 
 // Load the database layer include
 if (BaseFrameworkSystem::isReadableFile($fqfn)) {
diff --git a/inc/database/lib-lfdb.php b/inc/database/lib-lfdb.php
new file mode 100644 (file)
index 0000000..b365a9f
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+// Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
+
+/**
+ * Initializes the local file database class
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// For testing purposes we use a local file database
+$databaseInstance = ObjectFactory::createObjectByConfiguredName('local_file_database_class');
diff --git a/inc/database/lib-local.php b/inc/database/lib-local.php
deleted file mode 100644 (file)
index b365a9f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-
-/**
- * Initializes the local file database class
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-// For testing purposes we use a local file database
-$databaseInstance = ObjectFactory::createObjectByConfiguredName('local_file_database_class');