Code

Updated function.inc
[gosa.git] / gosa-core / include / class_config.inc
index bf5d0ab755b01c9744661b661355bc50f4177e63..a1c386f8293c15a91ac8c13c16f90e63f4caeeea 100644 (file)
@@ -221,8 +221,8 @@ class config  {
     /* Check for connection */
     if (is_null($this->ldap) || (is_int($this->ldap) && $this->ldap == 0)){
       $smarty= get_smarty();
-      msg_dialog::display(_("LDAP error"), _("Can't bind to LDAP. Please contact the system administrator."), ERROR_DIALOG);
-      display_error_page();
+      msg_dialog::display(_("LDAP error"), _("Cannot bind to LDAP. Please contact the system administrator."), FATAL_ERROR_DIALOG);
+      exit();
     }
 
     if (!session::is_set('size_limit')){
@@ -494,16 +494,18 @@ class config  {
 
     /* Load Terminalservers */
     $ldap->cd ($this->current['BASE']);
-    $ldap->search ("(objectClass=goTerminalServer)");
+    $ldap->search ("(objectClass=goTerminalServer)",array("cn","gotoSessionType"));
     $this->data['SERVERS']['TERMINAL']= array();
     $this->data['SERVERS']['TERMINAL'][]= "default";
+    $this->data['SERVERS']['TERMINAL_SESSION_TYPES'] = array();
+
 
-    $this->data['SERVERS']['FONT']= array();
-    $this->data['SERVERS']['FONT'][]= "default";
     while ($attrs= $ldap->fetch()){
       $this->data['SERVERS']['TERMINAL'][]= $attrs["cn"][0];
-      for ($i= 0; $i<$attrs["goFontPath"]["count"]; $i++){
-        $this->data['SERVERS']['FONT'][]= $attrs["goFontPath"][$i];
+      if(isset( $attrs["gotoSessionType"]['count'])){
+        for($i =0 ; $i < $attrs["gotoSessionType"]['count'] ; $i++){
+          $this->data['SERVERS']['TERMINAL_SESSION_TYPES'][$attrs["cn"][0]][] = $attrs["gotoSessionType"][$i]; 
+        }
       }
     }
 
@@ -551,8 +553,8 @@ class config  {
       /* If no samba servers are found, look for configured sid/ridbase */
       if (count($this->data['SERVERS']['SAMBA']) == 0){
         if (!isset($this->current["SID"]) || !isset($this->current["RIDBASE"])){
-          msg_dialog::display(_("Configuration error"), _("SID and/or RIDBASE missing in the configuration!"), ERROR_DIALOG);
-          display_error_page();
+          msg_dialog::display(_("Configuration error"), _("SID and/or RIDBASE missing in the configuration!"), FATAL_ERROR_DIALOG);
+          exit();
         } else {
           $this->data['SERVERS']['SAMBA']['DEFAULT']= array(
               "SID" => $this->current["SID"],