summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5063141)
raw | patch | inline | side by side (parent: 5063141)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 Jun 2006 07:48:45 +0000 (07:48 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 Jun 2006 07:48:45 +0000 (07:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3925 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_config.inc | patch | blob | history |
index 9cca396b698cd2c5e399f47ae69f6fb7786fe711..9c66e8941f61c4069616ac7831979760365b93f6 100644 (file)
--- a/include/class_config.inc
+++ b/include/class_config.inc
var $departments= array();
var $idepartments= array();
var $adepartments= array();
+ var $tdepartments= array();
function config($filename, $basedir= "")
{
$result= array();
$administrative= array();
$result['/']= $this->current['BASE'];
+ $this->tdepartments= array();
/* Get list of department objects */
$ldap= $this->get_ldap_link();
$ldap->search ("(objectClass=gosaDepartment)", array("ou", "objectClass", "gosaUnitTag"));
while ($attrs= $ldap->fetch()){
$dn= $ldap->getDN();
+ $this->tdepartments[$dn]= "";
/* Save administrative departments */
if (in_array_ics("gosaAdministrativeUnit", $attrs['objectClass']) &&
isset($attrs['gosaUnitTag'][0])){
$administrative[$dn]= $attrs['gosaUnitTag'][0];
+ $this->tdepartments[$dn]= $attrs['gosaUnitTag'][0];
+ }
+
+ if (in_array_ics("gosaAdministrativeUnitTag", $attrs['objectClass']) &&
+ isset($attrs['gosaUnitTag'][0])){
+ $this->tdepartments[$dn]= $attrs['gosaUnitTag'][0];
}
if ($dn == $ignore_dn){
$base = $config->current['BASE'];
$arr = array();
+ $ui= get_userinfo();
$this->idepartments= array();
/* Create multidimensional array, with all departments. */
foreach ($this->departments as $key => $val){
+ /* When using strict_units, filter non relevant parts */
+ if (preg_match('/true/i', $config->current['STRICT_UNITS'])){
+ if ($ui->gosaUnitTag != "" && isset($this->tdepartments[$val]) &&
+ $this->tdepartments[$val] != $ui->gosaUnitTag){
+ continue;
+ }
+ }
+
/* remove base from dn */
$val2 = str_replace($base,"",$val);