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 19
19
=========================================================================*/
20
20
21
21
define ('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
+ }
24
40
25
41
if (file_exists (LOCAL_CONFIGS_PATH . '/core.local.ini ' ))
26
42
{
Original file line number Diff line number Diff line change @@ -406,7 +406,14 @@ public static function getDataDirectory($subdir = '')
406
406
}
407
407
if (!isset ($ dataDirectory ) || empty ($ dataDirectory ))
408
408
{
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
+ }
410
417
}
411
418
if ($ subdir == '' )
412
419
{
@@ -441,7 +448,14 @@ public static function getTempDirectory($subdir = "misc")
441
448
}
442
449
if (!isset ($ tempDirectory ) || empty ($ tempDirectory ))
443
450
{
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
+ }
445
459
}
446
460
return $ tempDirectory .'/ ' .$ subdir .'/ ' ;
447
461
}
You can’t perform that action at this time.
0 commit comments