From 369f29daedeae1654d1ee56bb47cc5c0a41b0795 Mon Sep 17 00:00:00 2001
From: Benoit Mortier <benoit.mortier@opensides.be>
Date: Mon, 10 Oct 2011 16:55:21 +0200
Subject: [PATCH] Fixes: #488 configuration file path not settable in
 variables.inc

---
 include/functions.inc | 16 ----------------
 include/variables.inc | 20 +++++++++++++++++++-
 2 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/include/functions.inc b/include/functions.inc
index bcceda39f..bbb1037d1 100644
--- a/include/functions.inc
+++ b/include/functions.inc
@@ -23,22 +23,6 @@
 /*! \file
  * Common functions and named definitions. */
 
-/* Configuration file location */
-if(!isset($_SERVER['CONFIG_DIR'])){
-  define ("CONFIG_DIR", "/etc/fusiondirectory");
-}else{
-  define ("CONFIG_DIR",$_SERVER['CONFIG_DIR']);
-}
-
-/* Allow setting the config file in the apache configuration
-    e.g.  SetEnv CONFIG_FILE fusiondirectory.conf 1.0
- */
-if(!isset($_SERVER['CONFIG_FILE'])){
-  define ("CONFIG_FILE", "fusiondirectory.conf");
-}else{
-  define ("CONFIG_FILE",$_SERVER['CONFIG_FILE']);
-}
-
 /* Define common locations and variables */
 require_once ("variables.inc");
 
diff --git a/include/variables.inc b/include/variables.inc
index 2a10e61ed..559cee3ec 100644
--- a/include/variables.inc
+++ b/include/variables.inc
@@ -22,6 +22,24 @@
 
 /* Define common locations and variables */
 
+/* Allow setting the config file in the apache configuration
+    e.g. SetEnv CONFIG_DIR /etc/fusiondirectory
+*/
+if(!isset($_SERVER['CONFIG_DIR'])){
+  define ("CONFIG_DIR", "/etc/fusiondirectory");
+}else{
+  define ("CONFIG_DIR",$_SERVER['CONFIG_DIR']);
+}
+
+/* Allow setting the config file in the apache configuration
+    e.g.  SetEnv CONFIG_FILE fusiondirectory.conf 1.0
+ */
+if(!isset($_SERVER['CONFIG_FILE'])){
+  define ("CONFIG_FILE", "fusiondirectory.conf");
+}else{
+  define ("CONFIG_FILE",$_SERVER['CONFIG_FILE']);
+}
+
 /* Smarty compile dir */
 define ("SPOOL_DIR","/var/spool/fusiondirectory");
 
@@ -53,4 +71,4 @@ define("SMARTY3", "/usr/share/php/smarty3/Smarty.class.php");
 /* name of the class.cache file */
 define("CLASS_CACHE", "class.cache");
 
-?>
\ No newline at end of file
+?>
-- 
GitLab