causefx 8 лет назад
Родитель
Сommit
3fa19c6052
3 измененных файлов с 11 добавлено и 3 удалено
  1. 3 3
      functions.php
  2. 4 0
      index.php
  3. 4 0
      user.php

+ 3 - 3
functions.php

@@ -2099,10 +2099,10 @@ function createSQLiteDB($path = false) {
 // Upgrade Database
 function updateSQLiteDB($db_path = false, $oldVerNum = false) {
 	if (!$db_path) {
-		if (defined('DATABASE_LOCATION')) {
-			$db_path = DATABASE_LOCATION;
+		if (DATABASE_LOCATION){
+			$path = DATABASE_LOCATION;
 		} else {
-			debug_out('No Path Specified',1);
+			debug_out('No Path Specified!');
 		}
 	}
 	if (!isset($GLOBALS['file_db'])) {

+ 4 - 0
index.php

@@ -70,6 +70,10 @@ if(!file_exists('config/config.php')) {
 
 if (file_exists('config/config.php')) {
 
+    if (!DATABASE_LOCATION){
+		die(header("Refresh:0"));
+	}
+
     $configReady = "Yes";
 
     require_once("user.php");

+ 4 - 0
user.php

@@ -16,6 +16,10 @@
 	
     // Lazyload settings
 	$databaseConfig = configLazy('config/config.php');
+
+	if (!DATABASE_LOCATION){
+		die(header("Refresh:0"));
+	}
     
     if(file_exists('custom.css')) : define('CUSTOMCSS', 'true'); else : define('CUSTOMCSS', 'false'); endif; 
     $notifyExplode = explode("-", NOTIFYEFFECT);