Code

Gosa.conf, now will not have an entry for mail, if disabled is used
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 May 2005 11:42:39 +0000 (11:42 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 May 2005 11:42:39 +0000 (11:42 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@541 594d385d-05f5-0310-b6e9-bd551577e9d8

include/setup_checks.inc

index 91b45e51391682603b65116169f77c8650a28e7d..5c61c691bf3bc77074aa16178cbcbf02ef9fc563 100644 (file)
@@ -430,11 +430,9 @@ function parse_contrib_conf()
   $replacements['{CRYPT}']         = $ldapconf['arr_cryptkeys'][$ldapconf['arr_crypts']];
   $replacements['{SID}\n']         = "";
   $replacements['{RIDBASE}\n']     = "";
-  if($ldapconf['mail'] == "disabled")
-    $replacements['{MAILMETHOD}']    = "";
-  else
+  if($ldapconf['mail'] != "disabled"){
     $replacements['{MAILMETHOD}']    = $ldapconf['mail_methods'][$ldapconf['mail']];
-  if($ldapconf['mail'] == "disabled") 
+  }   
   $replacements['{SMBHASH}']       = $pwdhash;
   $replacements['{GOVERNMENTMODE}']= "false"; 
   $replacements['{kolabAccount}']  = "";
@@ -442,6 +440,7 @@ function parse_contrib_conf()
 
   /* This array contains all preg_replace syntax to delete all unused plugins
      THE kEY MUST BE THE CLASSNAME so we can check it with $ldapconf['classes'] */
+
   $possible_plugins['fonreport'][]   = "'\n.*<plugin.*fonreport+.*\n.*>.*\n'i";
   $possible_plugins['phoneaccount'][]= "'\n.*<tab.*phoneAccount.*>.*\n'i";
   $possible_plugins['logview'][]     = "'\n.*<plugin.*logview+.*\n.*>.*\n'i";
@@ -516,6 +515,11 @@ function parse_contrib_conf()
       $str = preg_replace("/".$key."/",$val,$str);
     }    
 
+    if($ldapconf['mail'] == "disabled"){
+      $str = str_replace("mailMethod=\"{MAILMETHOD}\"","",$str);
+    }
+
+
     /* Remove all unused plugins */
     foreach($possible_plugins as $plugin) {
       foreach($plugin as $key=>$val) {