Code

Fixed gotoXdmcpServer settings.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Feb 2008 15:03:09 +0000 (15:03 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Feb 2008 15:03:09 +0000 (15:03 +0000)
-Available servers weren't displayed.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8917 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_terminalService.inc

index c76cf28da25afd684e2fd87c770a2d59120390e4..0df15c58798662c3cd4a843d1c067b0ea9c3ee3b 100644 (file)
@@ -342,8 +342,10 @@ class termservice extends plugin
      */ 
     $xdmcp_types =  $this->config->data['SERVERS']['TERMINAL_SESSION_TYPES'];
     $available_servers = array();
-    if(isset($xdmcp_types[strtoupper($this->gotoXMethod)])){
-      $available_servers = $xdmcp_types[strtoupper($this->gotoXMethod)];
+    foreach($xdmcp_types as $servername =>$supported_types){
+      if(in_array(strtoupper($this->gotoXMethod),$supported_types)){
+        $available_servers[]  = $servername;
+      }
     }
 
     /* Append additional information to invalid server selections.
@@ -430,7 +432,12 @@ class termservice extends plugin
   {
     new log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs));
     $this->handle_post_events("remove");
-  }
+    plugin::remove_from_parent();
+    $ldap = $this->config->get_ldap_link();
+    $ldap->cd($this->dn);
+    $ldap->modify($this->attrs);
+    print_a($this->attrs);
+}
 
 
   /* Save data to object */
@@ -507,8 +514,10 @@ class termservice extends plugin
     if($this->gotoXMethod != "default"){
       $xdmcp_types =  $this->config->data['SERVERS']['TERMINAL_SESSION_TYPES'];
       $available_servers = array();
-      if(isset($xdmcp_types[strtoupper($this->gotoXMethod)])){
-        $available_servers = $xdmcp_types[strtoupper($this->gotoXMethod)];
+      foreach($xdmcp_types as $servername =>$supported_types){
+        if(in_array(strtoupper($this->gotoXMethod),$supported_types)){
+          $available_servers[]  = $servername;
+        }
       }
       foreach($this->selected_xdmcp_servers as $server){
         if(!in_array($server,$available_servers)){