From 99d18e638c3a208883005dbfb4a6f7d01cede29d Mon Sep 17 00:00:00 2001
From: Benoit Mortier <benoit.mortier@opensides.be>
Date: Sat, 14 Jan 2012 14:36:09 +0100
Subject: [PATCH] Fixes: #521 the vacation dir should be a in variables.inc
 also

---
 FAQ                                | 6 +++---
 contrib/man/fusiondirectory.conf.5 | 4 ++--
 include/variables.inc              | 3 +++
 setup/class_setupStep_Config2.inc  | 2 +-
 4 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/FAQ b/FAQ
index 910a28180..d40280124 100644
--- a/FAQ
+++ b/FAQ
@@ -122,13 +122,13 @@ A: There's the possibility to add a password hook in fusiondirectory.conf's main
 Q: What about templates for vacation messages?
 
 A: Create a directory to keep a set of vacation messages which are readable by the
-   user that runs your apache. In this example I'll use /etc/fusiondirectory/vacation for that.
+   user that runs your apache. In this example I'll use /var/cache/fusiondirectory/vacation for that.
 
    Put your vacation files in there containing a "DESC:some descriptive text" as the
    first line followed by the normal vacation text. You can use all attributes from
    the generic tab. I.e.:
 
-    /etc/fusiondirectory/vacation/business.txt 
+    /var/cache/fusiondirectory/vacation/business.txt 
 
    |--> 
     DESC:Away from desk
@@ -139,7 +139,7 @@ A: Create a directory to keep a set of vacation messages which are readable by t
     %givenName %sn
    |<--
  
-   Place the config option vacationTemplateDirectory="/etc/fusiondirectory/vacation" in the location found in
+   Place the config option vacationTemplateDirectory="/var/cache/fusiondirectory/vacation" in the location found in
    fusiondirectory.conf and a template box is show in the vacation mail tab.
 
 
diff --git a/contrib/man/fusiondirectory.conf.5 b/contrib/man/fusiondirectory.conf.5
index f9aec17da..1466a3fac 100644
--- a/contrib/man/fusiondirectory.conf.5
+++ b/contrib/man/fusiondirectory.conf.5
@@ -1222,9 +1222,9 @@ description for more details.
 The
 .I vacationTemplateDirectory
 statement sets the path where FusionDirectory will look for vacation message
-templates. Default is /etc/fusiondirectory/vacation.
+templates. Default is /var/cache/fusiondirectory/vacation.
 
-Example template /etc/fusiondirectory/vacation/business.txt:
+Example template /varc/cache/fusiondirectory/vacation/business.txt:
 
 .nf
    DESC:Away from desk
diff --git a/include/variables.inc b/include/variables.inc
index 20eba09e8..29945e104 100644
--- a/include/variables.inc
+++ b/include/variables.inc
@@ -58,6 +58,9 @@ define ("CONFIG_TEMPLATE_DIR", "/var/cache/fusiondirectory/template/");
 /* Directory containing the fai logs */
 define ("FAI_LOG_DIR", "/var/cache/fusiondirectory/fai/");
 
+/* Directory containing the vacation files */
+define ("VACATION_DIR", "/var/cache/fusiondirectory/vacation/");
+
 /* fpdf library path */ 
 define("FPDF","/usr/share/php/fpdf/fpdf.php");
 
diff --git a/setup/class_setupStep_Config2.inc b/setup/class_setupStep_Config2.inc
index 7c6d316c0..45f2555b8 100644
--- a/setup/class_setupStep_Config2.inc
+++ b/setup/class_setupStep_Config2.inc
@@ -31,7 +31,7 @@ class Step_Config2 extends setup_step
   var $mail           = "none";
   var $mail_attrib    = "";
   var $mail_methods   = array();
-  var $mail_settings = array("vacationdir"        => "/etc/fusiondirectory/vacation",
+  var $mail_settings = array("vacationdir"        => VACATION_DIR,
                              "vacationdir_active" => FALSE);
 
   var $generic_settings  = array( "wws_ou"        => "ou=winstations",
-- 
GitLab