Code

Updated toggle method
[gosa.git] / gosa-core / setup / class_setupStep_Config2.inc
index 7a9a1cb8e02edc4dc7ff8637b3d6d2ca0b5657ac..1bf1d2ff5c13f3d81c4a7dbced193141a828edfb 100644 (file)
@@ -34,15 +34,13 @@ class Step_Config2 extends setup_step
                              "vacationdir_active" => FALSE);
 
   var $generic_settings  = array( "enableCopyPaste" => false,
-                                  "enableDNS"      => false,
-                                  "enableDHCP"      => false,
                                   "wws_ou"        => "ou=winstations",
                                   "wws_ou_active" => FALSE,
                                   "snapshot_active"     => FALSE,
                                   "snapshot_base"       => "ou=snapshots,%base%",
                                   "snapshot_user"       => "%admin%",
                                   "snapshot_password"   => "",
-                                  "logging"             => "syslog,mysql",
+                                  "logging"             => TRUE,
                                   "snapshot_server"     => "%connection%");
 
   var $samba_settings    = array( "samba_sid"        => "0-815-4711",
@@ -52,14 +50,10 @@ class Step_Config2 extends setup_step
                                   "samba_rid_active" => FALSE); 
 
   var $sambaDomain_found    = FALSE;
-  var $use_netatalk         = FALSE;
-  var $enableFAI_management = FALSE;
-  var $enableMimeType       = FALSE;
-
   var $timezone       = "Europe/Berlin";
   var $timezones      = array();
 
-  var $attributes = array("mail_attrib","governmentmode","sambaidmapping","cyrusunixstyle","mail","use_netatalk","enableFAI_management","timezone","enableMimeType");
+  var $attributes = array("mail_attrib","governmentmode","sambaidmapping","cyrusunixstyle","mail","timezone");
   var $called = FALSE;
 
   function Step_Config2()
@@ -116,30 +110,6 @@ class Step_Config2 extends setup_step
         $this->samba_settings['samba_rid_active'] = TRUE;
       }
   
-      /* Check if we can enable netatalk plugin */
-      $tmp = $ldap->get_objectclasses();
-      if(is_array($tmp) && isset($tmp['apple-user'])) {
-        $this->use_netatalk = TRUE;
-      }
-
-      /* Check the FAI schema is used */
-      if(is_array($tmp) && isset($tmp['FAIclass'])){
-#        $this->enableFAI_management = TRUE;
-      }
-
-      /* Check the MimeType schema is used */
-      if(is_array($tmp) && isset($tmp['gotoMimeType'])){
-        $this->enableMimeType = TRUE;
-      }
-
-      if(is_array($tmp) && isset($tmp['dhcpClass'])){
-        $this->generic_settings['enableDHCP'] = TRUE;
-      }
-
-      if(is_array($tmp) && isset($tmp['dNSZone'])){
-        $this->generic_settings['enableDNS'] = TRUE;
-      }
-
       $this->called = TRUE;
     }
 
@@ -161,8 +131,7 @@ class Step_Config2 extends setup_step
     $smarty->assign("mail_methods",      reverse_html_entities($this->mail_methods));
     $smarty->assign("samba_settings",    reverse_html_entities($this->samba_settings));
 
-    $smarty->assign("logging_mysql" ,preg_match("/mysql/",$this->generic_settings['logging']));
-    $smarty->assign("logging_syslog",preg_match("/syslog/",$this->generic_settings['logging']));
+    $smarty->assign("logging",$this->generic_settings['logging']);
    
     $smarty->assign("bool",array(FALSE => _("No"), TRUE => _("Yes")));
     foreach($this->attributes as $attr){
@@ -191,14 +160,7 @@ class Step_Config2 extends setup_step
       }
 
       /* Get logging */
-      $logging = "";
-      if(isset($_POST['logging_syslog'])){
-        $logging.= "syslog,";
-      }
-      if(isset($_POST['logging_mysql'])){
-        $logging.= "mysql,";
-      }
-      $this->generic_settings['logging'] = trim($logging,",");
+      $this->generic_settings['logging'] =  isset($_POST['logging']);
 
       /* Mail settings */
       if(isset($_POST['vacationdir_active'])){
@@ -213,12 +175,6 @@ class Step_Config2 extends setup_step
       if(isset($_POST['enableCopyPaste'])){
         $this->generic_settings['enableCopyPaste'] = get_post('enableCopyPaste');
       }
-      if(isset($_POST['enableDNS'])){
-        $this->generic_settings['enableDNS'] = get_post('enableDNS');
-      }
-      if(isset($_POST['enableDHCP'])){
-        $this->generic_settings['enableDHCP'] = get_post('enableDHCP');
-      }
 
       if(isset($_POST['wws_ou_active'])){
         $this->generic_settings['wws_ou_active'] = TRUE;