]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/database.php
Payment introduced, minor rewrites
[shipsimu.git] / inc / database.php
index 03bc377ac5d781427711d319ddd2a873b9f8202a..52d7506032cc4ae0fdb093a9334b7ae664fe9357 100644 (file)
@@ -29,10 +29,9 @@ $layerInstance = null;
 $cfg = FrameworkConfiguration::getInstance();
 
 // Generate FQFN for the database layer
-$INC = sprintf("%sinc/database/lib-%s%s",
+$INC = sprintf("%sinc/database/lib-%s.php",
        $cfg->readConfig('base_path'),
-       $cfg->readConfig('db_type'),
-       $cfg->readConfig('php_extension')
+       $cfg->readConfig('db_type')
 );
 
 // Load the database layer include
@@ -78,6 +77,9 @@ try {
        ));
 }
 
+// Is the app variable there and valid?
+if (is_object($app)) $app->setDatabaseInstance($db);
+
 // Datenbankobjekt debuggen
 if (defined('DEBUG_DATABASE_OBJ')) {
        DebugMiddleware::getInstance()->output(sprintf("The database sub-system does now look like this:<br />