From: hickert Date: Wed, 21 Jun 2006 07:27:41 +0000 (+0000) Subject: Fixed typo, X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6b7c1beaa3ce50397a23d91388166088c108beac;p=gosa.git Fixed typo, Already used hotplug are now hiden in select list git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3845 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index bb4f7147e..a2347964c 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -123,7 +123,7 @@ class environment extends plugin $tmp[4] = ""; } - $tmp2['product'] = $tmp[3]; + $tmp2['produkt'] = $tmp[3]; $tmp2['vendor'] = $tmp[4]; $this->gotoHotplugDevices[$tmp[0]]=$tmp2; @@ -647,7 +647,11 @@ class environment extends plugin /* There are already defined hotplugs from other users we could use */ if(isset($_POST['gotoHotplugDeviceUse'])){ - $this->dialog = new hotplugDialog($this->config,$this->dn,true); + $tmp =array(); + foreach($this->gotoHotplugDevices as $plugs){ + $tmp[] = $plugs['name']; + } + $this->dialog = new hotplugDialog($this->config,$this->dn,true,$tmp); $this->is_dialog = true; } diff --git a/plugins/personal/environment/class_hotplugDialog.inc b/plugins/personal/environment/class_hotplugDialog.inc index 238bb9d24..6adf30896 100644 --- a/plugins/personal/environment/class_hotplugDialog.inc +++ b/plugins/personal/environment/class_hotplugDialog.inc @@ -24,11 +24,12 @@ class hotplugDialog extends plugin var $regex = "*"; var $depselect = "/"; var $deplist = "/"; + var $skipThese = array(); - - function hotplugDialog ($config, $dn= NULL,$use_existing=false ) + function hotplugDialog ($config, $dn= NULL,$use_existing=false ,$skipThese = array()) { $this->use_existing = $use_existing; + $this->skipThese = $skipThese; plugin::plugin ($config, $dn); $this->depselect = $this->config->current['BASE']; } @@ -179,6 +180,9 @@ class hotplugDialog extends plugin $tmp = split("\|",$device); if(preg_match("/^".str_replace("*","",$this->regex).".*/i",$tmp[0])){ + + if(in_array($tmp[0],$this->skipThese)) continue; + $a_return[$tmp[0]]= $tmp[0]." [".$tmp[1]."] ".$tmp[2]; $tmp2['name'] = $tmp[0];