summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0075628)
raw | patch | inline | side by side (parent: 0075628)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Oct 2008 12:42:24 +0000 (12:42 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Oct 2008 12:42:24 +0000 (12:42 +0000) |
-Do not display already assigned objects.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12782 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12782 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/class_selectUserToPrinterDialog.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
index 847da3ac38c2218b48fac60250f98d2b84a4b664..4041548a16441a7066f1e330db44d2b8d17f9c72 100644 (file)
}
if(isset($_POST['AddUser'])){
- $this->dialog = new selectUserToPrinterDialog($this->config, NULL,"AddUser");
+ $this->dialog = new selectUserToPrinterDialog($this->config, NULL,"AddUser",$this->member);
}
if(isset($_POST['AddGroup'])){
- $this->dialog = new selectUserToPrinterDialog($this->config, NULL,"AddGroup");
+ $this->dialog = new selectUserToPrinterDialog($this->config, NULL,"AddGroup",$this->member);
}
if(isset($_POST['AddAdminUser'])){
- $this->dialog = new selectUserToPrinterDialog($this->config, NULL,"AddAdminUser");
+ $this->dialog = new selectUserToPrinterDialog($this->config, NULL,"AddAdminUser",$this->member);
}
if(isset($_POST['AddAdminGroup'])){
- $this->dialog = new selectUserToPrinterDialog($this->config, NULL,"AddAdminGroup");
+ $this->dialog = new selectUserToPrinterDialog($this->config, NULL,"AddAdminGroup",$this->member);
}
/* Display ppd configure/select dialog */
diff --git a/gosa-plugins/goto/admin/systems/goto/class_selectUserToPrinterDialog.inc b/gosa-plugins/goto/admin/systems/goto/class_selectUserToPrinterDialog.inc
index 333fab3a7150b4f25b300e4a1eb3bbcfd7e9393d..246f21516c061099a248dd52bfb80962240af2a6 100644 (file)
var $baseAddition = "";
var $type = "";
var $search_cat = "";
+
+ var $dns_used = array();
- function selectUserToPrinterDialog (&$config, $dn= NULL,$type=false )
+ function selectUserToPrinterDialog (&$config, $dn= NULL,$type=false,$already_assigned )
{
plugin::plugin ($config, $dn);
$this->depselect = $this->config->current['BASE'];
}
$this->type = $type;
+ /* Collect already assigned object dns */
+ $this->dns_used = array();
+ if(isset($already_assigned[$type])){
+ foreach($already_assigned[$type] as $entry){
+ $this->dns_used[] = $entry['dn'];
+ }
+ }
}
function execute()
$res= get_list($filter,$cat,$base,$attrs);
}
foreach($res as $printer){
+
+ /* Skip already used entries */
+ if(in_array($printer['dn'],$this->dns_used)) {
+ continue;
+ }
+
if(($detailed ==true)){
if(isset($printer[$this->searchAppend])){
$a_return[$printer[$this->searchAppend][0]] = $printer;