From: hickert Date: Wed, 11 Jun 2008 13:15:50 +0000 (+0000) Subject: Updated function convert_department_dn works without config now. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1a7a2f33214af08332dbaa5c402ac7e4858fc6e6;p=gosa.git Updated function convert_department_dn works without config now. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11288 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index dd8f69efa..62ca20be9 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -1105,14 +1105,18 @@ function &get_smarty() } -function convert_department_dn($dn) +function convert_department_dn($dn, $base = NULL) { + global $config; $dep= ""; + if($base == NULL){ + $base = $config->current['BASE']; + } + /* Build a sub-directory style list of the tree level specified in $dn */ - global $config; - $dn = preg_replace("/".normalizePreg($config->current['BASE'])."$/i","",$dn); + $dn = preg_replace("/".normalizePreg($base)."$/i","",$dn); if(empty($dn)) return("/"); foreach (split(',', $dn) as $rdn){