From a3a26d5cdfe06a0bce364e34376657211ff8204f Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 12 Mar 2010 14:23:03 +0000 Subject: [PATCH] Fixed multi query editor git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16493 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_userFilterEditor.inc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gosa-core/include/class_userFilterEditor.inc b/gosa-core/include/class_userFilterEditor.inc index 68c26fe64..f51e3499b 100644 --- a/gosa-core/include/class_userFilterEditor.inc +++ b/gosa-core/include/class_userFilterEditor.inc @@ -199,12 +199,18 @@ class userFilterEditor extends plugin if(isset($_POST['addQuery'])){ $filter= $this->listing->getFilter(); - $backend = 'filterLDAP'; + $backend = 'LDAP'; $query = "(objectClass=*)"; if(isset($filter->searches[$this->parent])){ - $query = $filter->searches[$this->parent]['query']['filter']; - $backend = $filter->searches[$this->parent]['query']['backend']; - print_a($filter->searches[$this->parent]); + + $tmp = $filter->searches[$this->parent]; + if(isset($tmp['query'][count($this->queries)])){ + $query = $tmp['query'][count($this->queries)]['filter']; + $backend = $tmp['query'][count($this->queries)]['backend']; + }elseif(isset($tmp['query']['filter'])){ + $query = $tmp['query']['filter']; + $backend = $tmp['query']['backend']; + } } $this->queries[] = array('backend'=> $backend, 'filter' => userFilterEditor::_autoIndentFilter($query," ")); -- 2.30.2