index 5f2d94ec64750d0cc840e3196c0dd76e033d5d05..2afa3fe60685fe2e85029debd50dcb29552e9c1c 100644 (file)
var $xmlData;
var $searches= array();
var $search;
var $xmlData;
var $searches= array();
var $search;
+
+ #FIXME - Seems to be obsolete. Categories are defined in the listing.xml <objectType>
+ # and not in the filter.xml anymore.
var $category= "";
var $objectStorage= array();
var $base= "";
var $category= "";
var $objectStorage= array();
var $base= "";
var $converter= null;
var $pid;
var $converter= null;
var $pid;
+ /* An editor which allows to create user defined ldap-filter.
+ * Due to the fact that it requires additional ldap schemata
+ * (objectClasses=gosaProperties) this is currently optional.
+ */
+ var $filterEditor = NULL;
+
+ /* The categories this filter is made for (e.g. ['users'] or. ['server','workstation']).
+ * Since this is set we are able to create user defined filters.
+ */
+ var $categories = array();
function filter($filename)
{
function filter($filename)
{
$filter= preg_replace("/\\$/", "*".normalizeLdap($this->value)."*", $filter);
}
$filter= preg_replace("/\\$/", "*".normalizeLdap($this->value)."*", $filter);
}
- $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->categories, $this->objectStorage));
}
return ($result);
}
return ($result);
$config["category"], $config["objectStorage"]);
} else {
$result= call_user_func(array($backend, 'query'), $this->base, $this->scope, $filter, $attributes,
$config["category"], $config["objectStorage"]);
} else {
$result= call_user_func(array($backend, 'query'), $this->base, $this->scope, $filter, $attributes,
- $this->category, $this->objectStorage);
+ $this->categories, $this->objectStorage);
}
foreach ($result as $entry) {
}
foreach ($result as $entry) {
// Build ul/li list
$result.= "<ul class='level2'>";
$result.= "<li><a href='#'>Dummy placeholder</a></li>";
// Build ul/li list
$result.= "<ul class='level2'>";
$result.= "<li><a href='#'>Dummy placeholder</a></li>";
+ $result.= "<li><a href='#'>Dummy placeholder</a></li>";
#$result.= "<li$separator><a href='#' onClick='document.getElementById(\"actionmenu\").value= \"".$action['name']."\";mainform.submit();'>$img"._($action['label'])."</a></li>";
# AUTOCOMPLETER and getTextbox
#$result.= "<li$separator><a href='#' onClick='document.getElementById(\"actionmenu\").value= \"".$action['name']."\";mainform.submit();'>$img"._($action['label'])."</a></li>";
# AUTOCOMPLETER and getTextbox
return "<div id='filtermenu'>".$result."</li></ul><div>$script";
}
return "<div id='filtermenu'>".$result."</li></ul><div>$script";
}
+
+
+ function setCategories($categories)
+ {
+ if(!is_array($categories) && !empty($categories)){
+ $categories = array($categories) ;
+ }
+ $this->categories = $categories;
+ }
}
}