summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 31f1999)
raw | patch | inline | side by side (parent: 31f1999)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 1 Sep 2005 06:25:11 +0000 (06:25 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 1 Sep 2005 06:25:11 +0000 (06:25 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1278 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/departments/class_departmentGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc
index d7f709f807c0bba378e15205cedf535a838916bd..3b50131dba4363bf2a9b8c43be0c183689176952 100644 (file)
$this->config->make_idepartments();
$smarty= get_smarty();
-
- /* Show main page */
- $smarty->assign("bases", $this->config->idepartments);
+ /* Hide all departments, that are subtrees of this department */
+ $bases = $this->config->idepartments;
+ $tmp = array();
+ foreach($bases as $dn=>$base){
+
+ /* Only attach departments which are not a subtree of this one */
+ if(!preg_match("/".$this->dn."/",$dn)){
+ $tmp[$dn]=$base;
+ }
+ }
+ $smarty->assign("bases", $tmp);
foreach ($this->attributes as $val){
$smarty->assign("$val", $this->$val);
$smarty->assign("$val"."ACL", chkacl($this->acl, "$val"));
}
- $smarty->assign("bases", $this->config->idepartments);
$smarty->assign("base_select", $this->base);
return($smarty->fetch (get_template_path('generic.tpl', TRUE)));
}