Pārlūkot izejas kodu

+ read active project config file if exists

Piotr Labudda 7 gadi atpakaļ
vecāks
revīzija
a8e421ca4b
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  1. 9 0
      SE/se-lib/Config.php

+ 9 - 0
SE/se-lib/Config.php

@@ -61,6 +61,15 @@ class Config {
 
 		if ($_main_config === null) {
 			$_main_config = self::getConfFile();
+
+			if ($projPath = Config::getProjectPath()) {
+				if (file_exists("{$projPath}/config.php")) {
+					$projConfig = include "{$projPath}/config.php";
+					if (!empty($projConfig)) {
+						$_main_config = array_merge($_main_config, $projConfig);
+					}
+				}
+			}
 		}
 
 		if ($key == 'get-all-data') {