浏览代码

+ read active project config file if exists

Piotr Labudda 7 年之前
父节点
当前提交
a8e421ca4b
共有 1 个文件被更改,包括 9 次插入0 次删除
  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') {