summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0e4b08a)
raw | patch | inline | side by side (parent: 0e4b08a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 21 Jun 2006 07:27:41 +0000 (07:27 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 21 Jun 2006 07:27:41 +0000 (07:27 +0000) |
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
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3845 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_environment.inc | patch | blob | history | |
plugins/personal/environment/class_hotplugDialog.inc | patch | blob | history |
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index bb4f7147ed2fe721fe6f5a3ac7afd44cb045a691..a2347964cd293988d39f64e5f4546291ee30eaba 100644 (file)
$tmp[4] = "";
}
- $tmp2['product'] = $tmp[3];
+ $tmp2['produkt'] = $tmp[3];
$tmp2['vendor'] = $tmp[4];
$this->gotoHotplugDevices[$tmp[0]]=$tmp2;
/* 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 238bb9d2404ced79d8337bcea9081b57897557da..6adf308960bdd98941970712ea6cca90d85d4d76 100644 (file)
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'];
}
$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];