From ee4089f2471af6588b58aef647e0dcb7f9ceafca Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 30 May 2008 08:39:33 +0000 Subject: [PATCH] Allow override of config path and file git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11119 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/functions.inc | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 18bac90a4..dd8f69efa 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -21,8 +21,25 @@ */ /* Configuration file location */ -define ("CONFIG_DIR", "/etc/gosa"); -define ("CONFIG_FILE", "gosa.conf"); + +/* Allow setting the config patj in the apache configuration + e.g. SetEnv CONFIG_FILE /etc/path + */ +if(!isset($_SERVER['CONFIG_DIR'])){ + define ("CONFIG_DIR", "/etc/gosa"); +}else{ + define ("CONFIG_DIR",$_SERVER['CONFIG_DIR']); +} + +/* Allow setting the config file in the apache configuration + e.g. SetEnv CONFIG_FILE gosa.conf.2.5 + */ +if(!isset($_SERVER['CONFIG_FILE'])){ + define ("CONFIG_FILE", "gosa.conf"); +}else{ + define ("CONFIG_FILE",$_SERVER['CONFIG_FILE']); +} + define ("CONFIG_TEMPLATE_DIR", "../contrib/"); define ("TEMP_DIR","/var/cache/gosa/tmp"); -- 2.30.2