summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5b3c82c)
raw | patch | inline | side by side (parent: 5b3c82c)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 12 Apr 2006 14:50:52 +0000 (14:50 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 12 Apr 2006 14:50:52 +0000 (14:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3040 594d385d-05f5-0310-b6e9-bd551577e9d8
include/functions.inc | patch | blob | history |
diff --git a/include/functions.inc b/include/functions.inc
index 2de43011a4a95a2f881559cf41b41c26c0c5449e..0c47bada49ee79d34c3e914f9b1763c82754caeb 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
@@ -514,10 +514,7 @@ function get_list2($subtreeACL, $filter, $subsearch= TRUE, $base="", $attrs= arr
$dn= $ldap->getDN();
foreach ($subtreeACL as $key => $value){
if (preg_match("/$key/", $dn)){
- $dnAlias = preg_replace("/^ou=/","",$dn);
- $dnAlias = preg_replace("/,o.*$/","",$dnAlias);
- $dnAlias = preg_replace('/###GOSAREPLACED###/', ',', $dnAlias);
- $attrs["dn"]=$dnAlias;
+ $attrs["dn"]= convert_department_dn($dn);
$result[]= $attrs;
break;
}
function convert_department_dn2($dn)
{
-
-/*
-
- I think this no longer used ...
- Check this, and remove this function
-
-
-*/
-
$dep= "";
+
/* Build a sub-directory style list of the tree level
specified in $dn */
$deps = array_flip($_SESSION['config']->idepartments);
if(isset($deps[$dn])){
$dn= $deps[$dn];
$dep = preg_replace("/^.*=/","",$dn);
- }else{
- global $config;
- $base = "ou=";
- if(isset($config->current['BASE'])){
- $base = $config->current['BASE'];
- }
- if(preg_match("%".$base."%",$dn)){
- $dep= preg_replace("%^.*\/([^\/]+)$%", "\\1", $dn);
- }else{
- $dep = $dn;
- }
+ }else{
+ $dep= preg_replace("%^.*/([^/]+)$%", "\\1", $dn);
}
/* Return and remove accidently trailing slashes */