From 6b25015cb40b047a4e11fea5120dedcbe4245d7d Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 12 May 2005 07:37:48 +0000 Subject: [PATCH] checks for kolab mail method inserted git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@192 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/setup_checks.inc | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/include/setup_checks.inc b/include/setup_checks.inc index 2c097bd4b..1e496df47 100644 --- a/include/setup_checks.inc +++ b/include/setup_checks.inc @@ -39,6 +39,7 @@ function view_schema_check($table) function schema_check($server, $admin, $password,$aff=0) { global $config; + $messages= array(); $required_classes= array( @@ -69,7 +70,8 @@ function schema_check($server, $admin, $password,$aff=0) "goCupsServer" => array("version" => "2.1", "class" => array("posixAccount", "terminals"),), "goImapServer" => array("version" => "2.1", "class" => array("mailAccount", "mailgroup"),"file" => "gosa+samba3.schema"), "goKrbServer" => array("version" => "2.1"), - "goFaxServer" => array("version" => "2.1", "class" => "gofaxAccount","file" => "gofax.schema") + "goFaxServer" => array("version" => "2.1", "class" => "gofaxAccount","file" => "gofax.schema"), + ); /* Build LDAP connection */ @@ -169,8 +171,21 @@ function schema_check($server, $admin, $password,$aff=0) $affich['phoneaccount']=$messages['phoneaccount']."gofon.schema"; }else{$affich['phoneaccount']=_("Support for gofon enabledgofon.schema");} + + if(($_SESSION['ldapconf']['mail_methods'][$_SESSION['ldapconf']['mail']] == "kolab")) + if(!isset($objectclasses['kolabInetOrgPerson'])) + { + $messages['kolab']= _("Support for Kolab disabled, no schema seems to be installed, setting mail-method to cyrus"); + $tmp = array_flip($_SESSION['ldapconf']['mail_methods']); + $_SESSION['ldapconf']['mail']=$tmp['cyrus']; + $affich['kolab']=$messages['kolab'].""; + }else{$affich['kolab']=_("Support for Kolab enabledgofon.schema");} + + if($aff==0)return ($messages); else return(array_merge($affich,$affich2)); + + } @@ -346,21 +361,6 @@ $msg.= check ( $faults, _("PHP.ini check -> magic_quotes_gpc"), _("Security option, php will escape all quotes in strings ."), $magic_quotes_gpc['local_value'],0,false); - - - - - - - - - - - - - - - return $msg; } @@ -850,10 +850,11 @@ function show_setup_page4($withoutput = true) if(isset($_POST['check'])) { $ldap= new LDAP($_SESSION['ldapconf']['admin'], $_SESSION['ldapconf']['password'], $_SESSION['ldapconf']['uri']); - + + if($withoutput){ $m= schema_check($_SESSION['ldapconf']['uri'], $_SESSION['ldapconf']['admin'], $_SESSION['ldapconf']['password']); $_SESSION['classes']= $m; - + } if ($ldap->error != "Success") { @@ -894,7 +895,6 @@ function show_setup_page4($withoutput = true) // and wants you to download the gosa.conf .... function show_setup_page5($withoutput=true) { - // Get ldapconf $ldapconf= $_SESSION['ldapconf']; @@ -909,7 +909,7 @@ function show_setup_page5($withoutput=true) $message = ""; $message.=""; $m= schema_check($ldapconf['uri'], $ldapconf['admin'], $ldapconf['password'],1); - + if($withoutput) { $smarty->assign ("schemas", view_schema_check($m)); -- 2.30.2