From: Roland Haeder Date: Sun, 26 Feb 2017 13:08:47 +0000 (+0100) Subject: renamed lib-local.php -> lib-lfdb.php because it really loads the "legendary" X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=7629f2314d517561d4301ddfb068a797b6ed8700 renamed lib-local.php -> lib-lfdb.php because it really loads the "legendary" local file database class. Signed-off-by: Roland Häder --- diff --git a/inc/config.php b/inc/config.php index bd6ef833..645c8a5e 100644 --- a/inc/config.php +++ b/inc/config.php @@ -43,7 +43,7 @@ $cfg->setConfigEntry('base_path', ApplicationEntryPoint::detectCorePath() . '/') $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/'); diff --git a/inc/database.php b/inc/database.php index 01ab8471..c54d1d9c 100644 --- a/inc/database.php +++ b/inc/database.php @@ -34,7 +34,11 @@ use CoreFramework\Middleware\Debug\DebugMiddleware; $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)) { diff --git a/inc/database/lib-lfdb.php b/inc/database/lib-lfdb.php new file mode 100644 index 00000000..b365a9f3 --- /dev/null +++ b/inc/database/lib-lfdb.php @@ -0,0 +1,29 @@ + + * @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 . + */ + +// 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 index b365a9f3..00000000 --- a/inc/database/lib-local.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @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 . - */ - -// For testing purposes we use a local file database -$databaseInstance = ObjectFactory::createObjectByConfiguredName('local_file_database_class');