summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 969e07f)
raw | patch | inline | side by side (parent: 969e07f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Nov 2008 13:33:38 +0000 (13:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Nov 2008 13:33:38 +0000 (13:33 +0000) |
Do not spend too much time with in_array check the array index instead
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12968 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12968 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_userinfo.inc | patch | blob | history |
index bec139e58cc9afc352cedd4e0356893e5da3a590..2b987ad1ef501ea6cd3d1b124480753e46b23b16 100644 (file)
$dn = preg_replace("/^[^,]+,/","",$dn);
}
if(isset($this->config->idepartments[$dn])){
- $deps[] = $dn;
+ $deps[$dn] = $dn;
}
}
}
/* For all gosaDepartments */
foreach ($this->config->departments as $dn){
- if(in_array($dn,$deps)) continue;
+ if(isset($deps[$dn])) continue;
$acl = "";
if(strpos($mod, '/')){
$acl.= $this->get_permissions($dn,$mod);
$acl.= $this->get_category_permissions($dn,$mod,TRUE);
}
if(!empty($acl)) {
- $deps[] = $dn;
+ $deps[$dn] = $dn;
}
}
$ACL_CACHE['MODULE_DEPARTMENTS'][$mod] = $deps;
$res = array_merge($res,$deps);
- }
- return ($res);
+ }
+
+ return (array_values($res));
}