Code

Updated userFilter::getFilter to return valid multi query filters
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Mar 2010 13:35:22 +0000 (13:35 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Mar 2010 13:35:22 +0000 (13:35 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16489 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_userFilter.inc
gosa-core/include/class_userFilterEditor.inc

index f713e4860bb517565245444406ee8f7ed5b792ee..2bcf9ffd4912122f3d6c0008b8c06e357f84b96f 100644 (file)
@@ -217,10 +217,11 @@ class userFilter extends plugin
         if(!isset($tmp['name'])) continue;
           
         // Remove line breaks from the filter, which may were added for better reading. 
-        $c = preg_split('/\n/',$tmp['filter']);
-
-        foreach($c as $key => $str) $c[$key] = trim($str);
-        $tmp['filter'] = implode($c);
+        foreach($tmp['queries'] as $key => $query){
+          $c = preg_split('/\n/',$query['filter']);
+          foreach($c as $key => $str) $c[$key] = trim($str);
+          $tmp['queries'][$key]['filter'] = implode($c);
+        }
  
         // The filter is visible if it is shared or if is one of our own creations.
         //  ... and enabled.
index f118b56183157d953f5bbb0aba43251594292874..68c26fe642c7463ea2bcf6a6a43f77cf39c11caf 100644 (file)
@@ -204,6 +204,7 @@ class userFilterEditor extends plugin
         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]);
         }
 
         $this->queries[] = array('backend'=> $backend, 'filter' => userFilterEditor::_autoIndentFilter($query,"  "));