diff --git a/plugins/personal/environment/class_selectPrinterDialog.inc b/plugins/personal/environment/class_selectPrinterDialog.inc
index efeca4e995c6500319163504f078d57e93e4e9cc..2400b2857909eb1b3fd9a89f33406f0c94de54d8 100644 (file)
var $ignore_account = TRUE;
var $attributes = array();
var $objectclasses = array("whatever");
- var $use_existing = false;
+ var $AlreadyAssigned = array();
var $regex = "*";
var $depselect = "/";
var $deplist = "/";
- function selectPrinterDialog ($config, $dn= NULL,$use_existing=false )
+ function selectPrinterDialog ($config, $dn= NULL,$alreadyused=array() )
{
- $this->use_existing = $use_existing;
+ $this->AlreadyAssigned = $alreadyused;
plugin::plugin ($config, $dn);
$this->depselect = $this->config->current['BASE'];
}
$ldap->cd($this->depselect);
$ldap->search("(&(objectClass=gotoPrinter)(cn=".$this->regex."))",array("*"));
while($printer = $ldap->fetch()){
+
+ if(isset($this->AlreadyAssigned[$printer['cn'][0]])) continue;
+
if($detailed ==true){
$a_return[$printer['cn'][0]] = $printer;
}else{