summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c2e8f07)
raw | patch | inline | side by side (parent: c2e8f07)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 9 Mar 2010 07:39:48 +0000 (07:39 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 9 Mar 2010 07:39:48 +0000 (07:39 +0000) |
- Forward categories from listing to filter, to allow to use the correct categories not those defined in the filter.xml (single value).
This may be done in another way, when the filter is redesigned.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16354 594d385d-05f5-0310-b6e9-bd551577e9d8
This may be done in another way, when the filter is redesigned.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16354 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_filter.inc | patch | blob | history | |
gosa-core/include/class_listing.inc | patch | blob | history |
index 5f2d94ec64750d0cc840e3196c0dd76e033d5d05..2afa3fe60685fe2e85029debd50dcb29552e9c1c 100644 (file)
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 $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)
{
$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);
$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) {
// 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
return "<div id='filtermenu'>".$result."</li></ul><div>$script";
}
+
+
+ function setCategories($categories)
+ {
+ if(!is_array($categories) && !empty($categories)){
+ $categories = array($categories) ;
+ }
+ $this->categories = $categories;
+ }
}
index 38842dfb2ba762d670e1a7140e7b7e14a487a3d9..d4f972d3da2c5357fdb2f11ed6fe0c502125e3f3 100644 (file)
function setFilter($filter)
{
+ $filter->setCategories($this->categories);
$this->filter= &$filter;
if ($this->departmentBrowser){
$this->departments= $this->getDepartments();