From c18e80ba0277f5bc4e7050abdc37e34df49e8d59 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 10 Oct 2007 09:34:33 +0000 Subject: [PATCH] Udpated ldap server list for workstation startup git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7486 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/class_workstationStartup.inc | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 70b0e8088..b54499a40 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -737,16 +737,28 @@ class workstartup extends plugin } break; } + if(preg_match("/gotoLdapRemove_/",$name)){ + $id = preg_replace("/^gotoLdapRemove_([0-9]*)_(x|y)$/","\\1",$name); + $value = $this->gotoLdapServers[$id]; + $this->gotoLdapServers = array_remove_entries(array($value),$this->gotoLdapServers); + break; + } } } /* Add Entries */ foreach($this->gotoLdapServers as $key => $server){ + if(!in_array($server,$this->gotoLdapServerList)){ + $server = $server." (missing)"; + } + $SelectBoxLdapServer->AddEntry( array(array("string" => $server), - array("string" => " ". - "", + array("string" => + " ". + " ". + "", "attach" => "style='border-right:0px;'"))); } @@ -755,8 +767,15 @@ class workstartup extends plugin }else{ $smarty->assign("gotoLdapServerACL_inherit", $this->getacl("gotoLdapServer")); } + + $list = array(); + foreach($this->gotoLdapServerList as $key => $entry){ + if(!in_array($entry,$this->gotoLdapServers)){ + $list[$key] = $entry; + } + } $smarty->assign("gotoLdapServers", $SelectBoxLdapServer->DrawList()); - $smarty->assign("gotoLdapServerList", $this->gotoLdapServerList); + $smarty->assign("gotoLdapServerList", $list); $smarty->assign("gotoLdap_inherit", $this->gotoLdap_inherit); $smarty->assign("JS", $_SESSION['js']); -- 2.30.2