From: hickert Date: Thu, 1 Sep 2005 05:57:39 +0000 (+0000) Subject: removed undefined ... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3be2be2d1ddb15e958c18eaa69a07f748c4901d5;p=gosa.git removed undefined ... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1276 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/functions.inc b/include/functions.inc index 3c85199dc..26ae481b5 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -760,12 +760,14 @@ function convert_department_dn2($dn) specified in $dn */ $deps = array_flip($_SESSION['config']->idepartments); - $dn= $deps[$dn]; - - $tmp = split (",", $dn); - -// $dep= preg_replace("%^.*/([^/]+)$%", "\\1", $tmp[0]); - $dep = preg_replace("/^.*=/","",$tmp[0]); + if(isset($deps[$dn])){ + $dn= $deps[$dn]; + $tmp = split (",", $dn); + $dep = preg_replace("/^.*=/","",$tmp[0]); + }else{ + $tmp = split (",", $dn); + $dep= preg_replace("%^.*/([^/]+)$%", "\\1", $tmp[0]); + } /* Return and remove accidently trailing slashes */ $tmp = rtrim($dep, "/");