summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cf8ce21)
raw | patch | inline | side by side (parent: cf8ce21)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Sep 2009 13:34:17 +0000 (13:34 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Sep 2009 13:34:17 +0000 (13:34 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14188 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_filter.inc | patch | blob | history | |
gosa-core/include/class_listing.inc | patch | blob | history |
index cce5f48cae679dd4efae6d7e1cfa8bd618e2361b..373b37e9bd740dd510aa74691550f1fb047f36ac 100644 (file)
}
+ function getObjectBase($dn)
+ {
+ global $config;
+ $base= "";
+
+ // Try every object storage
+ $storage= $this->objectStorage;
+ if (!is_array($storage)){
+ $storage= array($storage);
+ }
+ foreach ($storage as $location) {
+ $pattern= "/^[^,]+,".preg_quote($location, '/')."/i";
+ $base= preg_replace($pattern, '', $dn);
+ }
+
+ /* Set to base, if we're not on a correct subtree */
+ if (!isset($config->idepartments[$base])){
+ $base= $config->current['BASE'];
+ }
+
+ return $base;
+ }
+
+
}
?>
index 911c904f06dc254c12121b74081c25d0b17e3bc8..1f819c2d213bd9b3d34cd6ac92285aaf30b34afe 100644 (file)
}
if ($action == 'HOME') {
$ui= get_userinfo();
- $this->base= get_base_from_people($ui->dn);
+ $this->base= $this->filter->getObjectBase($ui->dn);
}
// Reload departments
$listhead ="";
/* Check if we are in users home department */
- if(!count($deps) ||$this->filter->base == get_base_from_people($ui->dn)){
+ if(!count($deps) || $this->filter->base == $this->filter->getObjectBase($ui->dn)){
$enableHome = false;
}