summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1211bfc)
raw | patch | inline | side by side (parent: 1211bfc)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Apr 2006 12:08:45 +0000 (12:08 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Apr 2006 12:08:45 +0000 (12:08 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3033 594d385d-05f5-0310-b6e9-bd551577e9d8
include/functions.inc | patch | blob | history |
diff --git a/include/functions.inc b/include/functions.inc
index 0c47bada49ee79d34c3e914f9b1763c82754caeb..b98e65917d64800a71c87826874fe227a2de837d 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
function convert_department_dn2($dn)
{
$dep= "";
-
/* Build a sub-directory style list of the tree level
specified in $dn */
$deps = array_flip($_SESSION['config']->idepartments);
$dn= $deps[$dn];
$dep = preg_replace("/^.*=/","",$dn);
}else{
- $dep= preg_replace("%^.*/([^/]+)$%", "\\1", $dn);
+ if(preg_match("/=/",$dn)){
+ $dep= preg_replace("%^.*\/([^\/]+)$%", "\\1", $dn);
+ }else{
+ $dep = $dn;
+ }
}
/* Return and remove accidently trailing slashes */