From c1d4329d695ba06d9618f41e2fcd350c7cbd5247 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 31 May 2005 11:42:39 +0000 Subject: [PATCH] Gosa.conf, now will not have an entry for mail, if disabled is used git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@541 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/setup_checks.inc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/setup_checks.inc b/include/setup_checks.inc index 91b45e513..5c61c691b 100644 --- a/include/setup_checks.inc +++ b/include/setup_checks.inc @@ -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.*.*\n'i"; $possible_plugins['phoneaccount'][]= "'\n.*.*\n'i"; $possible_plugins['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) { -- 2.30.2