summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9032290)
raw | patch | inline | side by side (parent: 9032290)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Dec 2009 12:59:44 +0000 (12:59 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Dec 2009 12:59:44 +0000 (12:59 +0000) |
-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
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14936 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_filter.inc | patch | blob | history | |
gosa-core/include/class_filterLDAP.inc | patch | blob | history |
index 286725978de42d16a0ae507d2dd0f39f7e2a7513..9b2fed5458381bcf79bba4e76752ac552e2b6042 100644 (file)
$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,$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);
index d49463ae6aee9331b47e6b512224ac53ae1e599f..7697462049580281c7976e3314516cdeafd5e74f 100644 (file)
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');
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();