From 3844e0ef56a91ba4b0c3f9723eeba83f147a5ee4 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 14 Sep 2006 10:52:42 +0000 Subject: [PATCH] Optimizations git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4657 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/functions.inc | 8 +++++--- .../personal/environment/class_kioskManagementDialog.inc | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/functions.inc b/include/functions.inc index c6e9943e7..06b898405 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1263,9 +1263,11 @@ function get_printer_list($cups_server) /* Merge in printers from LDAP */ $ldap= $config->get_ldap_link(); $ldap->cd ($config->current['BASE']); - $ldap->search('(objectClass=gotoPrinter)', array('cn')); - while ($attrs= $ldap->fetch()){ - $res[$attrs["cn"][0]]= $attrs["cn"][0]; + $ui= get_userinfo(); + if (preg_match('/TRUE/i', $config->current['STRICT_UNITS']) && $ui->gosaUnitTag != ""){ + $ldap->search('((objectClass=gotoPrinter)(gosaUnitTag='.$ui->gosaUnitTag.'))', array('cn')); + } else { + $ldap->search('(objectClass=gotoPrinter)', array('cn')); } return $res; diff --git a/plugins/personal/environment/class_kioskManagementDialog.inc b/plugins/personal/environment/class_kioskManagementDialog.inc index 1a126d9b4..3288c4792 100644 --- a/plugins/personal/environment/class_kioskManagementDialog.inc +++ b/plugins/personal/environment/class_kioskManagementDialog.inc @@ -18,7 +18,9 @@ class kioskManagementDialog extends plugin function kioskManagementDialog ($config, $dn= NULL,$attach=false ) { - plugin::plugin ($config, $dn); + $this->config= $config; + $this->dn= $dn; + if($attach){ $this->filesToAttach = $attach; } -- 2.30.2