From: hickert Date: Wed, 23 Dec 2009 12:59:44 +0000 (+0000) Subject: Reverted changes. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=927b0e3e34d43d9f439991d841c690aa7c07eab0;p=gosa.git Reverted changes. -Will creating a new seperate filter will be much butter. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14936 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_filter.inc b/gosa-core/include/class_filter.inc index 286725978..9b2fed545 100644 --- a/gosa-core/include/class_filter.inc +++ b/gosa-core/include/class_filter.inc @@ -383,9 +383,6 @@ class filter { $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'])) { @@ -411,8 +408,7 @@ class filter { } } - $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); + $result= array_merge($result, call_user_func(array($backend, 'query'), $this->base, $this->scope, $filter, $attributes, $this->category, $this->objectStorage)); } return ($result); diff --git a/gosa-core/include/class_filterLDAP.inc b/gosa-core/include/class_filterLDAP.inc index d49463ae6..769746204 100644 --- a/gosa-core/include/class_filterLDAP.inc +++ b/gosa-core/include/class_filterLDAP.inc @@ -2,29 +2,17 @@ class filterLDAP { - static function query($base, $scope, $filter, $attributes, $category, $method,$objectStorage= "") + static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "") { $config= session::global_get('config'); $ldap= $config->get_ldap_link(TRUE); $flag= ($scope == "sub")?GL_SUBSEARCH:0; - $result= filterLDAP::get_list($base, $filter, $attributes, $category, $objectStorage,$method, $flag | GL_SIZELIMIT); + $result= filterLDAP::get_list($base, $filter, $attributes, $category, $objectStorage, $flag | GL_SIZELIMIT); return $result; } - - static function unifyResults($results) - { - $res = array(); - foreach($results as $entry){ - if(!isset($res[$entry['dn']])){ - $res[$entry['dn']] = $entry; - } - } - return(array_values($res)); - } - - static function get_list($base, $filter, $attributes, $category, $objectStorage, $method, $flags= GL_SUBSEARCH) + static function get_list($base, $filter, $attributes, $category, $objectStorage, $flags= GL_SUBSEARCH) { $ui= session::global_get('ui'); $config= session::global_get('config'); @@ -36,9 +24,7 @@ class filterLDAP { if (!is_array($objectStorage)) { $objectStorage= array($objectStorage); } - if(empty($method)){ - $method= (empty($objectStorage) && !($flags & GL_SUBSEARCH))?"ls":"search"; - } + $method= (empty($objectStorage) && !($flags & GL_SUBSEARCH))?"ls":"search"; // Initialize search bases $bases= array();