Code

Added samba version tag
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 4 Apr 2007 05:13:03 +0000 (05:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 4 Apr 2007 05:13:03 +0000 (05:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5960 594d385d-05f5-0310-b6e9-bd551577e9d8

setup/class_setupStep7.inc
setup/class_setupStep8.inc

index f1360c0bd0c8ba8921fc280a7afee1e6e8f01362..cea3655633c4828469c6f923d79d3bb9852a7656 100644 (file)
@@ -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. 
      */
index 31ff4e97e1fac5bd12cabba7357962617299a5ba..14d5600a1305b17f6fd4ca7043277f06a0000178 100644 (file)
@@ -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();
     }