index 3a9e38d75856c25e3fa1bb45c3019d840dfa3fc5..286725978de42d16a0ae507d2dd0f39f7e2a7513 100644 (file)
$checked= " checked";
}
- $result= "<input class='filter_checkbox' name='$tag' type='checkbox' onClick='document.mainform.submit();' value='true'$checked>";
+ $result= "<input class='filter_checkbox' id='$tag' name='$tag' type='checkbox' onClick='document.mainform.submit();' value='true'$checked>";
return $result;
}
function getCombobox($element)
{
- $result= "<select name='".$element['tag']."' size='1' onClick='document.mainform.submit();'>";
+ $result= "<select name='".$element['tag']."' size='1' onChange='document.mainform.submit();'>";
// Fill with presets
foreach ($element['value'] as $value) {
}
+ function setComboBoxOptions($tag, $options)
+ {
+ if (isset($this->elements[$tag]) && $this->elements[$tag]['type'] == "combobox") {
+
+ $this->elements[$tag]['value']= array();
+ foreach ($options as $key => $label) {
+ $this->elements[$tag]['value'][]= array('label' => $label, 'key' => $key);
+ }
+ }
+ }
+
+
function getCurrentBase()
{
if (isset($this->search->base) && (string)$this->search->scope != "auto") {
function renderScope()
{
$checked= $this->scope == "sub"?" checked":"";
- return "<input type='checkbox' name='SCOPE' value='1' onClick='document.mainform.submit();'$checked> "._("Search in subtrees");
+ return "<input type='checkbox' id='SCOPE' name='SCOPE' value='1' onClick='document.mainform.submit();'$checked> <LABEL for='SCOPE'>"._("Search in subtrees")."</LABEL>";
}
$filter= $query['filter'];
$attributes= $query['attribute'];
+ $method = "";
+ if(isset($query['method'])) $method = $query['method'];
+
// Generate final filter
foreach ($this->elements as $tag => $element) {
if (!isset($element['set']) || !isset($element['unset'])) {
}
}
- $result= array_merge($result, call_user_func(array($backend, 'query'), $this->base, $this->scope, $filter, $attributes, $this->category, $this->objectStorage));
+ $result= array_merge($result, call_user_func(array($backend, 'query'), $this->base, $this->scope, $filter, $attributes, $this->category,$method, $this->objectStorage));
+ $result = call_user_func(array($backend, 'unifyResults'), $result);
}
return ($result);
function update()
{
-
/* React on alphabet links if needed */
if (isset($_GET['filter'])){
- $s= mb_substr(validate($_GET['filter']), 0, 1, "UTF8")."*";
- if ($s == "**"){
- $s= "*";
- }
+ $s= mb_substr(validate($_GET['filter']), 0, 1, "UTF8");
foreach ($this->alphabetElements as $tag) {
$this->elementValues[$tag]= $s;
}
}
// Make filter
- $filter= preg_replace("/\\$$tag/", normalizeLDAP($value), $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,
$config["category"], $config["objectStorage"]);