diff --git a/gosa-core/include/class_userFilterEditor.inc b/gosa-core/include/class_userFilterEditor.inc
index e2ebf9d2a7517239d02b12634d4fe301eff0c0e7..6c86f4b519853ff238789b0d69d87d8c9eca2460 100644 (file)
if($entry){
$this->entry = $entry;
$this->parent = $entry['parent'];
- $this->name = $entry['name'];
+ $this->name = $entry['tag'];
$this->description = $entry['description'];
- foreach($entry['queries'] as $query){
+ foreach($entry['query'] as $query){
$query['filter'] = userFilterEditor::_autoIndentFilter($query['filter'], " ");
$this->queries[] = $query;
}
$smarty->assign("fixedFilters", array_keys($filter->searches));
$smarty->assign('parent', $this->parent);
$smarty->assign('backends', $this->backends);
- $smarty->assign('name', htmlentities($this->name,ENT_COMPAT,'UTF-8'));
+ $smarty->assign('tag', htmlentities($this->name,ENT_COMPAT,'UTF-8'));
$smarty->assign('queries', $queries);
$smarty->assign('share', $this->share);
$smarty->assign('enable', $this->enabled);
if(isset($_POST['userFilterEditor'])){
// Get posted strings
- foreach(array('name','description', 'parent') as $attr){
+ foreach(array('tag','description', 'parent') as $attr){
if(isset($_POST[$attr])){
$this->$attr = get_post($attr);
}
}elseif(isset($_POST['availableCategory']) && !empty($_POST['availableCategory'])){
$this->selectedCategories[] = get_post('availableCategory');
}
+ $this->selectedCategories = array_unique($this->selectedCategories);
}
// Remove categories
{
$ret= array();
$ret['parent'] = $this->parent;
- $ret['name'] = $this->name;
+ $ret['tag'] = $this->name;
$ret['description'] = $this->description;
$ret['categories'] = $this->selectedCategories;
- $ret['queries'] = $this->queries;
+ $ret['query'] = $this->queries;
$ret['flags'] = array();
if($this->share){
$ret['flags'][] = "share";