diff --git a/setup.php b/setup.php index 2df864e..3d913a8 100644 --- a/setup.php +++ b/setup.php @@ -146,7 +146,7 @@ function write_config_file($dbt, $dbh, $dbn, $dbu, $dbp) { $cfg_content .= " // Database connection credentials\n"; $cfg_content .= " // \n"; - + $cfg_content .= " define(\"SQLITE_FILE\", \"weave_db\");\n"; if ( $dbt != "mysql" ) { $cfg_content .= " define(\"MYSQL_ENABLE\", false);\n"; $cfg_content .= " define(\"MYSQL_HOST\", \"localhost\");\n"; @@ -229,7 +229,7 @@ function print_mysql_connection_form() { // check if we have no configuration at the moment // if ( file_exists("settings.php") && filesize( "settings.php" ) > 0 ) { - echo "

The setup looks like it's completed, else please delete settings.php


"; + echo "

The setup looks like it's completed, please delete settings.php


"; exit; } @@ -319,8 +319,7 @@ if ( $action == "step2" ) { if ( file_exists($db_name) && filesize( $db_name ) > 0 ) { $dbInstalled = true; } else { - // echo("Creating sqlite weave storage: DBname". $db_name ." | username: ". $username); - // echo("
"); + echo("Creating sqlite weave storage: ". $db_name ."
"); $dbHandle = new PDO('sqlite:' . $db_name); $dbHandle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } diff --git a/weave_storage.php b/weave_storage.php index f64cc87..f08d7dd 100644 --- a/weave_storage.php +++ b/weave_storage.php @@ -58,7 +58,7 @@ class WeaveStorage if ( ! MYSQL_ENABLE ) { $path = explode('/', $_SERVER['SCRIPT_FILENAME']); - $db_name = 'weave_db'; + $db_name = SQLITE_FILE; array_pop($path); array_push($path, $db_name); $db_name = implode('/', $path);