From 0e13ec6f5ff52bfb2fa5d4cf797f0c1516a733eb Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 9 Mar 2010 08:22:18 +0000 Subject: [PATCH] Reverted filter editor changes. will move the editor into the listing. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16356 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_filter.inc | 32 ++--------------------------- gosa-core/include/class_listing.inc | 4 ++++ 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/gosa-core/include/class_filter.inc b/gosa-core/include/class_filter.inc index cb70fb4ab..5f2d94ec6 100644 --- a/gosa-core/include/class_filter.inc +++ b/gosa-core/include/class_filter.inc @@ -25,9 +25,6 @@ class filter { var $xmlData; var $searches= array(); var $search; - - #FIXME - Seems to be obsolete. Categories are defined in the listing.xml - # and not in the filter.xml anymore. var $category= ""; var $objectStorage= array(); var $base= ""; @@ -39,16 +36,6 @@ class filter { 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) { @@ -60,11 +47,6 @@ class filter { } $this->pid= preg_replace("/[^0-9]/", "", microtime(TRUE)); - - // Instantiate the filter editor. - if(class_available("filterEditor")){ - $this->filterEditor = new filterEditor($config, $this); - } } @@ -285,7 +267,7 @@ class 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->categories, $this->objectStorage)); + $result= array_merge($result, call_user_func(array($backend, 'query'), $this->base, $this->scope, $filter, $attributes, $this->category, $this->objectStorage)); } return ($result); @@ -335,7 +317,7 @@ class filter { $config["category"], $config["objectStorage"]); } else { $result= call_user_func(array($backend, 'query'), $this->base, $this->scope, $filter, $attributes, - $this->categories, $this->objectStorage); + $this->category, $this->objectStorage); } foreach ($result as $entry) { @@ -416,7 +398,6 @@ class filter { // Build ul/li list $result.= "
$script"; } - - - function setCategories($categories) - { - if(!is_array($categories) && !empty($categories)){ - $categories = array($categories) ; - } - $this->categories = $categories; - } } diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index d4f972d3d..52b5cc0c0 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -271,6 +271,10 @@ class listing { return($message); } + // Display filter editor + if(0) + return($this->filter->filterEditor->execute()); + // Some browsers don't have the ability do do scrollable table bodies, filter them // here. $switch= false; -- 2.30.2