Browse Source

Ignore some stuff, throw an error if location doesnt exist

Cerothen 9 năm trước cách đây
mục cha
commit
0437841731
2 tập tin đã thay đổi với 13 bổ sung2 xóa
  1. 8 1
      .gitignore
  2. 5 1
      index.php

+ 8 - 1
.gitignore

@@ -54,4 +54,11 @@ homepageSettings.ini.php
 loginLog.json
 custom.css
 _config.yml
-test.php
+test.php
+users.db
+config/config.php
+config/users/
+config/users
+config/users.db
+
+

+ 5 - 1
index.php

@@ -42,7 +42,11 @@ if(!file_exists('config/config.php')) {
 			$_POST['database_Location'] = str_replace('//','/',$_POST['database_Location'].'/');
 			$_POST['USER_HOME'] = $_POST['database_Location'].'users/';
 		}
-		updateConfig($_POST);
+		if (file_exists($_POST['database_Location'])) {
+			updateConfig($_POST);
+		} else {
+			debug_out('Dir doesn\'t exist: '.$_POST['database_Location'],1); // Pretty Up
+		}
 	} else {
 		$configReady = "No";
 		$userpic = "";