From 95752211798c38c8608900b11ae4be1d9aa86654 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 25 Jun 2008 10:28:24 +0000 Subject: [PATCH] Updated function.inc -Allow setting the configuration file in the apache configuration file. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@11438 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/functions.inc | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/include/functions.inc b/include/functions.inc index cebbb4a3f..6b55a0cf9 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -18,9 +18,24 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* Configuration file location */ -define ("CONFIG_DIR", "/etc/gosa"); -define ("CONFIG_FILE", "gosa.conf"); +/* Allow setting the config patih 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 ("HELP_BASEDIR", "/var/www/doc/"); -- 2.30.2