From 1661a16896a97da9b540063102c751041a2ee15c Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 4 Apr 2007 05:13:03 +0000 Subject: [PATCH] Added samba version tag git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5960 594d385d-05f5-0310-b6e9-bd551577e9d8 --- setup/class_setupStep7.inc | 13 ++++++++++++- setup/class_setupStep8.inc | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/setup/class_setupStep7.inc b/setup/class_setupStep7.inc index f1360c0bd..cea365563 100644 --- a/setup/class_setupStep7.inc +++ b/setup/class_setupStep7.inc @@ -25,9 +25,10 @@ class setup_step_7 extends setup_step var $checked = array(); var $not_checked = array(); var $schema_readable = FALSE; - var $attributes = array("enable_schema_check"); + var $attributes = array("enable_schema_check","samba_version"); var $display_type = "failed"; var $enable_schema_check = TRUE; + var $samba_version = 3; function setup_step_7() { @@ -102,6 +103,16 @@ class setup_step_7 extends setup_step return (array(array("msg" => _("Can't get schema information from server. No schema check possible!"), "status" => FALSE))); } + + /* Which samba version do we use? */ + if(isset($objectclasses['sambaSamAccount'])){ + $this->samba_version = 3; + } elseif(isset($objectclasses['sambaAccount'])) { + $this->samba_version = 2; + }else{ + $this->samba_version = 0; + } + /* This is the default block used for each entry. * to avoid unset indexes. */ diff --git a/setup/class_setupStep8.inc b/setup/class_setupStep8.inc index 31ff4e97e..14d5600a1 100644 --- a/setup/class_setupStep8.inc +++ b/setup/class_setupStep8.inc @@ -79,6 +79,9 @@ class setup_step_8 extends setup_step header('Content-Disposition: attachment; filename="gosa.conf"'); } + $str = $this->get_conf_data(); + $str = preg_replace("/\n[ ]*\n/","",$str); + echo $this->get_conf_data(); exit(); } -- 2.30.2