From 07177f3ae4e5903df563d21c805e0deb36ee0e24 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 14 Feb 2008 15:03:09 +0000 Subject: [PATCH] Fixed gotoXdmcpServer settings. -Available servers weren't displayed. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8917 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/goto/class_terminalService.inc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc index c76cf28da..0df15c587 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc @@ -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)){ -- 2.30.2