summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 30c77db)
raw | patch | inline | side by side (parent: 30c77db)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Mar 2010 08:40:29 +0000 (08:40 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Mar 2010 08:40:29 +0000 (08:40 +0000) |
- Take care of object permissions (requires 'objectClass' in the list of requested attributes)
- Fixed typo in autocomplete generation, maxlength wasn't replaced by {$maxlength}
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@16945 594d385d-05f5-0310-b6e9-bd551577e9d8
- Fixed typo in autocomplete generation, maxlength wasn't replaced by {$maxlength}
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@16945 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_filter.inc | patch | blob | history |
index cd9aa8dd7294a6956ba027dcda8b05726587ea7c..76c794911643ede8025ad024d02e2ab0ce648a87 100644 (file)
if (isset($element['maxlength'])){
$maxlength= $element['maxlength'];
}
- $result= "<input class='filter_textfield' id='$tag' name='$tag' type='text' size='$size' maxlength='maxlength' value='".$this->elementValues[$tag]."'>";
+ $result= "<input class='filter_textfield' id='$tag' name='$tag' type='text' size='$size' maxlength='{$maxlength}' value='".$this->elementValues[$tag]."'>";
if (isset($element['autocomplete'])) {
$frequency= "0.5";
$characters= "1";
$filter= $query['filter'];
$attributes= $query['attribute'];
+ // ObjectClass is required to check permissions later.
+ if(!in_array('objectClass', $attributes)) $attributes[] = 'objectClass';
+
// Generate final filter
foreach ($this->elements as $tag => $element) {
if (!isset($element['set']) || !isset($element['unset'])) {
$attributes= array($attributes);
}
+ // ObjectClass is required to check permissions later.
+ if(!in_array('objectClass', $attributes)) $attributes[] = 'objectClass';
+
// Make filter
$filter= preg_replace("/\\$$tag/", normalizeLdap($value), $filter);
if (isset($config['base']) && isset($config['scope']) && isset($config['category'])) {
- $result= call_user_func(array($backend, 'query'), $config['base'], $config['scope'], $filter, $attributes,
+ $result= call_user_func(array($backend, 'query'), $this,$config['base'], $config['scope'], $filter, $attributes,
$config["category"], $config["objectStorage"]);
} else {
- $result= call_user_func(array($backend, 'query'), $this->base, $this->scope, $filter, $attributes,
+ $result= call_user_func(array($backend, 'query'), $this,$this->base, $this->scope, $filter, $attributes,
$this->category, $this->objectStorage);
}