Code

Fixed Terminal/Workstation -template string in mangement list.
[gosa.git] / plugins / admin / groups / class_groupApplication.inc
index 4c84648265be1e65665ad902c3c037b1317548f6..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);
       }
     }
 
@@ -810,6 +813,12 @@ class appgroup extends plugin
         $ret[$attrs['dn']] = $name;
       }
     }
+
+    /* Set releases to / id nor presenet */
+    if (!count($ret)){
+      $ret['/']= '/';
+    }
+
     return($ret);
   }