From: hickert Date: Thu, 30 Nov 2006 06:47:07 +0000 (+0000) Subject: Updated get_printer_list X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2255bc8f95b2e1159d9306a99f1c563536eb06c6;p=gosa.git Updated get_printer_list Replaced ldap->search with get_list, to ensure that we only see those printers that we are able to read ( acls). git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5257 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/functions.inc b/include/functions.inc index 1e0bafeb1..58942bd78 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1156,15 +1156,10 @@ function get_printer_list($cups_server) { global $config; $res = array(); - - /* 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()){ + $data = get_list('(objectClass=gotoPrinter)',"printer",$config->current['BASE'], array('cn')); + foreach($data as $attrs ){ $res[$attrs['cn'][0]] = $attrs['cn'][0]; } - return $res; }