From ac7e7a5abc44277b8fcbe3f4a2220af9cd82d469 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 15 Nov 2006 12:07:35 +0000 Subject: [PATCH] Only display last department name in apps-list. like 'dep' instead of 'blub/depr/dep...' git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5125 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/groups/class_groupApplication.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc index 113894274..df6f8c094 100644 --- a/plugins/admin/groups/class_groupApplication.inc +++ b/plugins/admin/groups/class_groupApplication.inc @@ -615,11 +615,14 @@ class appgroup extends plugin $departments = array(); $res = get_list("(objectClass=gosaDepartment)",$ui->subtreeACL,$this->curbase,array("description","cn","ou"),GL_SIZELIMIT); foreach($res as $value){ - $fdn= @LDAP::fix($value['dn']); + + $fdn = $value['dn']; + $fdn = preg_replace("/".normalizePreg($this->curbase)."/","",$fdn); + $fdn= @LDAP::fix($fdn); if($value["description"][0]!=".."){ $departments[$value['dn']]= convert_department_dn($fdn)." - [".$value["description"][0]."]"; }else{ - $departments[$value['dn']]=convert_department_dn($fdn); + $departments[$value['dn']]= convert_department_dn($fdn); } } -- 2.30.2