Browse Source

Added DB Path to folder check

causefx 7 years ago
parent
commit
442ddb00f3
2 changed files with 5 additions and 4 deletions
  1. 5 0
      api/functions.php
  2. 0 4
      api/functions/static-globals.php

+ 5 - 0
api/functions.php

@@ -16,6 +16,11 @@ configLazy();
 if (isset($GLOBALS['dbLocation'])) {
 	$GLOBALS['organizrLog'] = $GLOBALS['dbLocation'] . 'organizrLog.json';
 	$GLOBALS['organizrLoginLog'] = $GLOBALS['dbLocation'] . 'organizrLoginLog.json';
+	$GLOBALS['paths'] = array(
+		'Root Folder' => dirname(__DIR__, 2) . DIRECTORY_SEPARATOR,
+		'API Folder' => dirname(__DIR__, 1) . DIRECTORY_SEPARATOR,
+		'DB Folder' => $GLOBALS['dbLocation']
+	);
 	if (($GLOBALS['uuid'] == '')) {
 		$uuid = gen_uuid();
 		$GLOBALS['uuid'] = $uuid;

+ 0 - 4
api/functions/static-globals.php

@@ -13,10 +13,6 @@ $GLOBALS['userConfigPath'] = dirname(__DIR__, 1) . DIRECTORY_SEPARATOR . 'config
 $GLOBALS['defaultConfigPath'] = dirname(__DIR__, 1) . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'default.php';
 $GLOBALS['currentTime'] = gmdate("Y-m-d\TH:i:s\Z");
 $GLOBALS['docker'] = (file_exists(dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'Docker.txt')) ? true : false;
-$GLOBALS['paths'] = array(
-	'Root Folder' => dirname(__DIR__, 2) . DIRECTORY_SEPARATOR,
-	'API Folder' => dirname(__DIR__, 1) . DIRECTORY_SEPARATOR
-);
 // Quick function for plugins
 function pluginFiles($type)
 {