$message |
";
if ($test){
$msg.= _("OK")." ";
@@ -305,6 +337,7 @@ function perform_php_checks(&$faults)
function perform_additional_checks(&$faults)
{
+ $ret = NULL;
/* Programm check */
$msg= ""._("Checking for some additional programms")."";
@@ -435,8 +468,8 @@ function parse_contrib_conf()
$replacements['{LDAPHOST}'] = $ldapconf['uri'];
$replacements['{PASSWORD}'] = $ldapconf['password'];
$replacements['{CRYPT}'] = $ldapconf['arr_cryptkeys'][$ldapconf['arr_crypts']];
- $replacements['{SID}\n'] = "";
- $replacements['{RIDBASE}\n'] = "";
+ $replacements['{SID}'] = "";
+ $replacements['{RIDBASE}'] = "";
if($ldapconf['mail'] != "disabled"){
$replacements['{MAILMETHOD}'] = $ldapconf['mail_methods'][$ldapconf['mail']];
}
@@ -444,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'] */
@@ -455,7 +489,7 @@ function parse_contrib_conf()
$possible_plugins['webdav'][] = "'\n.*.*\n'i";
$possible_plugins['phpgroupware'][]= "'\n.*.*\n'i";
- /* Header information
+ /*Header information
Needed to send the generated gosa.conf to the browser */
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
@@ -492,7 +526,7 @@ function parse_contrib_conf()
/* Try to find a Samba Domain Objekt */
$ldap->search("(objectClass=sambaDomain)");
-
+
/* Something found ??? so we need to define ridbase an SID by ourselfs */
if($ldap->count()< 1) {
$replacements['{SID}']= "sid=\"123412-11\"";
@@ -528,7 +562,7 @@ function parse_contrib_conf()
/* Remove all unused plugins */
- foreach($possible_plugins as $plugin) {
+ foreach($possible_plugins as $key=> $plugin) {
foreach($plugin as $key=>$val) {
if(in_array($plugin,$classes)) {
$str = preg_replace($val,"\n",$str);
@@ -544,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));
@@ -573,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));
@@ -596,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 */
@@ -683,6 +720,7 @@ function show_setup_page4($withoutput = true)
{
$smarty= get_smarty();
+ // ?
if(!isset($_SESSION['ldapconf']['base'])){
$_SESSION['ldapconf']['base']= $base;
}
@@ -698,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");
@@ -822,6 +860,15 @@ function show_setup_page4($withoutput = true)
$_SESSION['ldapconf']['password']);
$_SESSION['classes']= $m;
+ 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. Please verify that it is readable for GOsa"));
+ }
+ $fault=true;
+ }
+
+
+
if ($ldap->error != "Success") {
if($withoutput) {
print_red(sprintf(_("Can't log into LDAP server. Reason was: %s."), $ldap->get_error()));
@@ -842,7 +889,6 @@ function show_setup_page4($withoutput = true)
if($withoutput){
$smarty->display (get_template_path('setup.tpl'));
}
-
return (!$fault);
}
@@ -862,7 +908,7 @@ function show_setup_page5($withoutput=true)
$info= posix_getgrgid(posix_getgid());
$smarty->assign("webgroup", $info['name']);
$smarty->assign("path", CONFIG_DIR);
- $message= "";
+ $message= "";
$m= schema_check($ldapconf['uri'], $ldapconf['admin'], $ldapconf['password'],1);
if($withoutput) {
@@ -1063,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 {
|