summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2fa4e24)
raw | patch | inline | side by side (parent: 2fa4e24)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Apr 2006 06:22:46 +0000 (06:22 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Apr 2006 06:22:46 +0000 (06:22 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3136 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_environment.inc | patch | blob | history | |
plugins/personal/environment/class_selectPrinterDialog.inc | patch | blob | history |
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index 562b0278f239c887b137dcd01e7c0ebcac1b9aeb..14cf03c420f6e0219e150eca2b22184aa9172d05 100644 (file)
/* First handle Add Post. Open a dialog that allows us to select a printer or two */
if(isset($_POST['gotoPrinterAdd'])){
$this->is_dialog=true;
- $this->dialog = new selectPrinterDialog($this->config,$this->dn);
+ $this->dialog = new selectPrinterDialog($this->config,$this->dn,$this->gotoPrinter);
}
if(isset($_POST['PrinterCancel'])){
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{