Code

Fixed multi query editor
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Mar 2010 14:23:03 +0000 (14:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Mar 2010 14:23:03 +0000 (14:23 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16493 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_userFilterEditor.inc

index 68c26fe642c7463ea2bcf6a6a43f77cf39c11caf..f51e3499b3923c758cd710abfbed760e11e540aa 100644 (file)
@@ -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,"  "));