From: hickert Date: Mon, 10 Jul 2006 08:12:22 +0000 (+0000) Subject: Updated functions for FAI X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=329483831c9f1d7210fd08a0433044d86b59a577;p=gosa.git Updated functions for FAI git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4059 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/functions_FAI.inc b/include/functions_FAI.inc index 5bb4da912..056e78ce9 100644 --- a/include/functions_FAI.inc +++ b/include/functions_FAI.inc @@ -116,7 +116,7 @@ function get_FAI_departments($suffix = "") /* Return all releases within the given base */ -function get_all_releases_from_base($dn) +function get_all_releases_from_base($dn,$appendedName) { global $config; $base = "ou=fai,ou=configs,ou=systems,".$dn; @@ -126,8 +126,12 @@ function get_all_releases_from_base($dn) $ldap->cd($base); $ldap->search("(objectClass=FAIbranch)",array("ou","dn")); while($attrs = $ldap->fetch()){ - $res[$attrs['dn']] = $attrs['ou'][0]; - } + if($appendedName){ + $res[$attrs['dn']] = convert_department_dn(preg_replace("/,ou=fai,ou=configs,ou=system.*$/","",$attrs['dn'])); + }else{ + $res[$attrs['dn']] = $attrs['ou'][0]; + } + } return($res); }