From: hickert Date: Fri, 22 Feb 2008 06:54:00 +0000 (+0000) Subject: Updated function.inc X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9f04d3488dd049b6fa789d4a28c015eb10ea3572;p=gosa.git Updated function.inc -Added GL_NO_ACL_CHECK flag to get_list git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9040 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index dfb6486e1..193524d26 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -898,31 +898,33 @@ function get_list($filter, $category, $base= "", $attributes= array(), $flags= G while($attrs = $ldap->fetch()) { $dn= $ldap->getDN(); - /* Sort in every value that fits the permissions */ - if (is_array($category)){ - foreach ($category as $o){ - if ($ui->get_category_permissions($dn, $o) != ""){ - if ($flags & GL_CONVERT){ - $attrs["dn"]= convert_department_dn($dn); - } else { - $attrs["dn"]= $dn; + /* Convert dn into a printable format */ + if ($flags & GL_CONVERT){ + $attrs["dn"]= convert_department_dn($dn); + } else { + $attrs["dn"]= $dn; + } + + if($flags & GL_NO_ACL_CHECK){ + $result[]= $attrs; + }else{ + + /* Sort in every value that fits the permissions */ + if (is_array($category)){ + foreach ($category as $o){ + if ($ui->get_category_permissions($dn, $o) != ""){ + + /* We found what we were looking for, break speeds things up */ + $result[]= $attrs; } + } + } else { + if ($ui->get_category_permissions($dn, $category) != ""){ /* We found what we were looking for, break speeds things up */ $result[]= $attrs; } } - } else { - if ($ui->get_category_permissions($dn, $category) != ""){ - if ($flags & GL_CONVERT){ - $attrs["dn"]= convert_department_dn($dn); - } else { - $attrs["dn"]= $dn; - } - - /* We found what we were looking for, break speeds things up */ - $result[]= $attrs; - } } }