This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +34
-4
lines changed Expand file tree Collapse file tree 2 files changed +34
-4
lines changed Original file line number Diff line number Diff line change 1919=========================================================================*/
2020
2121define ('CORE_CONFIGS_PATH ' , BASE_PATH . '/core/configs ' );
22- define ('LOCAL_CONFIGS_PATH ' , CORE_CONFIGS_PATH );
23- define ('LOGS_PATH ' , BASE_PATH . '/log ' );
22+
23+ if (getenv ('midas_local_configs_path ' ) !== false )
24+ {
25+ define ('LOCAL_CONFIGS_PATH ' , getenv ('midas_local_configs_path ' ));
26+ }
27+ else
28+ {
29+ define ('LOCAL_CONFIGS_PATH ' , CORE_CONFIGS_PATH );
30+ }
31+
32+ if (getenv ('midas_logs_path ' ) !== false )
33+ {
34+ define ('LOGS_PATH ' , getenv ('midas_logs_path ' ));
35+ }
36+ else
37+ {
38+ define ('LOGS_PATH ' , BASE_PATH . '/log ' );
39+ }
2440
2541if (file_exists (LOCAL_CONFIGS_PATH . '/core.local.ini ' ))
2642 {
Original file line number Diff line number Diff line change @@ -406,7 +406,14 @@ public static function getDataDirectory($subdir = '')
406406 }
407407 if (!isset ($ dataDirectory ) || empty ($ dataDirectory ))
408408 {
409- $ dataDirectory = BASE_PATH .'/data ' ;
409+ if (getenv ('midas_data_path ' ) !== false )
410+ {
411+ $ dataDirectory = getenv ('midas_data_path ' );
412+ }
413+ else
414+ {
415+ $ dataDirectory = BASE_PATH .'/data ' ;
416+ }
410417 }
411418 if ($ subdir == '' )
412419 {
@@ -441,7 +448,14 @@ public static function getTempDirectory($subdir = "misc")
441448 }
442449 if (!isset ($ tempDirectory ) || empty ($ tempDirectory ))
443450 {
444- $ tempDirectory = BASE_PATH .'/tmp ' ;
451+ if (getenv ('midas_temp_path ' ) !== false )
452+ {
453+ $ tempDirectory = getenv ('midas_temp_path ' );
454+ }
455+ else
456+ {
457+ $ tempDirectory = BASE_PATH .'/tmp ' ;
458+ }
445459 }
446460 return $ tempDirectory .'/ ' .$ subdir .'/ ' ;
447461 }
You can’t perform that action at this time.
0 commit comments