Code

Only display last department name in apps-list.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 15 Nov 2006 12:07:35 +0000 (12:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 15 Nov 2006 12:07:35 +0000 (12:07 +0000)
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

index 113894274e74ade2e1150f00eab33960b22180b3..df6f8c094fa44ec231f94f5bc2b0978c49ce3534 100644 (file)
@@ -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);
       }
     }