From: hickert Date: Wed, 2 Apr 2008 08:33:46 +0000 (+0000) Subject: Fixed functions inc get_ou X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c1234e9789d87e0d0f7e3196f55ef588b1a575a2;p=gosa.git Fixed functions inc get_ou -Do not append ',' to fetched department names, if department is absolute (ou=sudoers,dc=gonicus,dc=de) git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10102 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 5caf26ea7..1926e94f0 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -1166,10 +1166,17 @@ function get_ou($name) if ($ou != ""){ if (!preg_match('/^[^=]+=[^=]+/', $ou)){ - return @LDAP::convert("ou=$ou,"); + $ou = @LDAP::convert("ou=$ou"); } else { - return @LDAP::convert("$ou,"); + $ou = @LDAP::convert("$ou"); } + + if(preg_match("/".normalizePreg($config->current['BASE'])."$/",$ou)){ + return($ou); + }else{ + return("$ou,"); + } + } else { return ""; }