4
0
Эх сурвалжийг харах

Added global variable for main path and api path

causefx 7 жил өмнө
parent
commit
b81c323b30

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

@@ -13,6 +13,10 @@ $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(
+	'main' => dirname(__DIR__, 2) . DIRECTORY_SEPARATOR,
+	'api' => dirname(__DIR__, 1) . DIRECTORY_SEPARATOR
+);
 // Quick function for plugins
 function pluginFiles($type)
 {