Преглед изворни кода

Merge pull request #501 from causefx/cero-dev

Cero dev
causefx пре 8 година
родитељ
комит
a2bbdb31ed
3 измењених фајлова са 9 додато и 1 уклоњено
  1. 1 1
      functions.php
  2. 4 0
      index.php
  3. 4 0
      user.php

+ 1 - 1
functions.php

@@ -2014,7 +2014,7 @@ function timezoneOptions() {
 // Build Database
 function createSQLiteDB($path = false) {
 	if ($path === false) {
-		if (defined('DATABASE_LOCATION')) {
+		if (DATABASE_LOCATION){
 			$path = DATABASE_LOCATION;
 		} else {
 			debug_out('No Path Specified!');

+ 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);