From: hickert Date: Wed, 10 Mar 2010 08:57:34 +0000 (+0000) Subject: Updated filter initialization X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2ea5f657817c65b14d078b4f518839948f353508;p=gosa.git Updated filter initialization git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16365 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_filterEditor.inc b/gosa-core/include/class_filterEditor.inc index 92a0621e9..9c779ef24 100644 --- a/gosa-core/include/class_filterEditor.inc +++ b/gosa-core/include/class_filterEditor.inc @@ -29,12 +29,30 @@ class filterEditor extends plugin if(isset($this->attrs['gosaUserDefinedFilter'])){ for($i=0; $i< $this->attrs['gosaUserDefinedFilter']['count']; $i++){ list($categories, $name, $description, $filter, $flags) = split(";", $this->attrs['gosaUserDefinedFilter'][$i]); + + // Ensure that we no empty category in our category list. + if(empty($categories)){ + $categories = array(); + }else{ + $categories = split(',', $categories); + } + + // Ensure that we no empty entry in out flags list. + if(empty($flags)){ + $flags = array(); + }else{ + $flags = split(',', $flags); + } + + // build up filter entry. $tmp = array( 'name' => $name, - 'categories' => split(',', $categories), + 'categories' => $categories, 'description' => base64_decode($description), 'filter' => base64_decode($filter), - 'flags' => split(',',$flags)); + 'flags' => $flags); + + $this->filters[$name] = $tmp; } }