X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Ffunctions_setup.inc;h=84fcebc777fcd4707b9e7f063d51ed88df45af7c;hb=bd8af75b6afe09555128275d12c41df9f7cfa4d7;hp=335ee204d766e3bb9538e9b7bcfaee0d7ffb5473;hpb=588229f481da6fb0e0ee2fb20e7d88c566c96a8b;p=gosa.git
diff --git a/include/functions_setup.inc b/include/functions_setup.inc
index 335ee204d..84fcebc77 100644
--- a/include/functions_setup.inc
+++ b/include/functions_setup.inc
@@ -29,6 +29,7 @@ function view_schema_check($table)
return $message;
}
+
function is_schema_readable($server, $admin, $password)
{
$ds= ldap_connect ($server);
@@ -55,7 +56,7 @@ function is_schema_readable($server, $admin, $password)
return(true);
}
-function schema_check($server, $admin, $password, $aff=0)
+function schema_check($server, $admin, $password, $aff=0,$CalledByIndexPhP=false)
{
global $config;
@@ -78,7 +79,7 @@ function schema_check($server, $admin, $password, $aff=0)
"gosaApplicationGroup" => array("version" => "2.4", "class" => "appgroup","file" => "gosa.schema"),
"GOhard" => array("version" => "2.4", "class" => "terminals","file" => "goto.schema"),
- "gotoTerminal" => array("version" => "2.4", "class" => "terminals","file" => "goto.schema"),
+ "gotoTerminal" => array("version" => "2.0", "class" => "terminals","file" => "goto.schema"),
"goServer" => array("version" => "2.4","class" => "server","file" => "goserver.schema"),
"goTerminalServer" => array("version" => "2.4", "class" => "terminals","file" => "goto.schema"),
"goNfsServer" => array("version" => "2.4", "class" => "terminals","file" => "goto.schema"),
@@ -137,6 +138,7 @@ function schema_check($server, $admin, $password, $aff=0)
} else {
if (!check_schema_version($objectclasses[$key], $value['version'])){
$messages[$key]['msg']= sprintf(_("Optional objectclass '%s' required by plugin '%s' does not have version %s"), $key, $class, $value['version']);
+ $messages[$key]['needonstartup'] = TRUE;
$messages[$key]['status'] =FALSE;
}else {
if(!isset($affich2[$class])){
@@ -156,7 +158,9 @@ function schema_check($server, $admin, $password, $aff=0)
if (!check_schema_version($objectclasses[$key], $value['version'])){
$messages[$key]['msg']= sprintf(_("Required objectclass '%s' does not have version %s"), $key, $value['version']);
$messages[$key]['status'] = FALSE;
+ $messages[$key]['needonstartup'] = TRUE;
}
+
}
}
}
@@ -222,21 +226,24 @@ function schema_check($server, $admin, $password, $aff=0)
$affich['phoneaccount']['msg']= _("Support for gofon enabled")."
gofon.schema | ";
$affich['phoneaccount']['status']= true;
}
-
- if(($_SESSION['ldapconf']['mail_methods'][$_SESSION['ldapconf']['mail']] == "kolab")){
- if(!isset($objectclasses['kolabInetOrgPerson']))
- {
- $messages['kolab']['msg']= _("Support for Kolab disabled, no schema seems to be installed, setting mail-method to cyrus");
- $affich['kolab']['msg']=$messages['kolab']['msg']."kolab2.schema | ";
-
- $tmp= array_flip($_SESSION['ldapconf']['mail_methods']);
- $_SESSION['ldapconf']['mail']=$tmp['cyrus'];
- $messages['kolab']['status']= FALSE;
- $affich['kolab']['status']= FALSE;
- }else{
- $affich['kolab']['msg']=_("Support for Kolab enabled")."gofon.schema | ";
- $affich['kolab']['status']= TRUE;
- }
+
+ /* Fix for PHP Fehler "Undefined index: ldapconf"
+ * Ablaufverfolgung[1]: Funktion schema_check Datei: /home/hickert/gosa/include/functions_setup.inc (Zeile 230)
+ */
+ if((isset($_SESSION['ldapconf']['mail_methods']))&&(isset($_SESSION['ldapconf']))){
+ if(($_SESSION['ldapconf']['mail_methods'][$_SESSION['ldapconf']['mail']] == "kolab")&&(!$CalledByIndexPhP)){
+ if(!isset($objectclasses['kolabInetOrgPerson'])) {
+ $messages['kolab']['msg']= _("Support for Kolab disabled, no schema seems to be installed, setting mail-method to cyrus");
+ $affich['kolab']['msg']=$messages['kolab']['msg']."kolab2.schema | ";
+ $tmp= array_flip($_SESSION['ldapconf']['mail_methods']);
+ $_SESSION['ldapconf']['mail']=$tmp['cyrus'];
+ $messages['kolab']['status']= FALSE;
+ $affich['kolab']['status']= FALSE;
+ }else{
+ $affich['kolab']['msg']=_("Support for Kolab enabled")."gofon.schema | ";
+ $affich['kolab']['status']= TRUE;
+ }
+ }
}
if($aff==0){
return ($messages);
@@ -330,6 +337,7 @@ function perform_php_checks(&$faults)
function perform_additional_checks(&$faults)
{
+ $ret = NULL;
/* Programm check */
$msg= ""._("Checking for some additional programms")."
";
@@ -469,6 +477,7 @@ function parse_contrib_conf()
$replacements['{GOVERNMENTMODE}']= "false";
$replacements['{kolabAccount}'] = "";
$replacements['{servKolab}'] = "";
+ $replacements['{errorlvl}'] = $ldapconf['errorlvl'];
/* 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'] */
@@ -569,6 +578,7 @@ function parse_contrib_conf()
/* Show setup_page 1 */
function show_setup_page1($withoutput = true)
{
+ $faults = array();
$smarty = get_smarty();
$smarty->assign ("content", get_template_path('setup_introduction.tpl'));
$smarty->assign ("tests", perform_php_checks($faults));
@@ -598,6 +608,7 @@ function show_setup_page1($withoutput = true)
/* Show setup_page 2 */
function show_setup_page2($withoutput = true)
{
+ $faults = array();
$smarty = get_smarty();
$smarty->assign ("content", get_template_path('setup_step2.tpl'));
$smarty->assign ("tests", perform_additional_checks($faults));
@@ -621,6 +632,7 @@ function show_setup_page2($withoutput = true)
function show_setup_page3($withoutput = true)
{
+ $ds = NULL;
$smarty = get_smarty();
/* Take the Post oder the Sessioin saved data */
@@ -708,6 +720,7 @@ function show_setup_page4($withoutput = true)
{
$smarty= get_smarty();
+ // ?
if(!isset($_SESSION['ldapconf']['base'])){
$_SESSION['ldapconf']['base']= $base;
}
@@ -723,7 +736,7 @@ function show_setup_page4($withoutput = true)
$arr_crypts= array();
$temp = "";
$checkvars = array("location", "admin", "password", "peopleou", "base",
- "peopledn", "arr_crypts", "mail", "uidbase");
+ "peopledn", "arr_crypts", "mail", "uidbase","errorlvl");
if(!isset($_SESSION['ldapconf']['arr_cryptkeys'])) {
require_once("class_password-methods.inc");
@@ -849,7 +862,7 @@ function show_setup_page4($withoutput = true)
if(!is_schema_readable($ldapconf['uri'],$ldapconf['admin'],$ldapconf['password'])){
if($withoutput){
- print_red(_("Can't read schema informations, GOsa needs to know your schema setup. Pleasy verify taht it is readable for GOsa"));
+ print_red(_("Can't read schema informations, GOsa needs to know your schema setup. Please verify that it is readable for GOsa"));
}
$fault=true;
}
@@ -1096,7 +1109,7 @@ function create_user_for_setup($withoutput=true)
return(true);
} else {
- if(!($create_user)) {
+ if((!isset($create_user))||(!($create_user))) {
$smarty->assign ("content", get_template_path('setup_useradmin.tpl'));
$smarty->assign("exists",true);
} else {