X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_userFilterEditor.inc;h=023b5d32754e2f3c73bfe7b5acc6518a8a3b0037;hb=198fc11cacca32ca2c0dc33505bde39a38b999e6;hp=e2ebf9d2a7517239d02b12634d4fe301eff0c0e7;hpb=58258b849a93a49ce8d0460ae506c5ecbb134164;p=gosa.git diff --git a/gosa-core/include/class_userFilterEditor.inc b/gosa-core/include/class_userFilterEditor.inc index e2ebf9d2a..023b5d327 100644 --- a/gosa-core/include/class_userFilterEditor.inc +++ b/gosa-core/include/class_userFilterEditor.inc @@ -21,8 +21,7 @@ class userFilterEditor extends plugin // The list of all categories mangaged by the current filter object. // Used in the grop-down box. public $orig_name = ""; - - public $backends = array('LDAP', 'SYSTEMS', 'FAI', 'GroupLDAP','ACL'); + public $backends = array('LDAP','LDAPBlacklist', 'SYSTEMS', 'FAI', 'GroupLDAP','ACL', 'OPSIPackages','APPLICATIONS','MIMETYPES','CONFIGPROPERTIES'); /*! \brief Instantiate the filter editing dialog. @@ -34,10 +33,10 @@ class userFilterEditor extends plugin 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; } @@ -188,6 +187,7 @@ class userFilterEditor extends plugin }elseif(isset($_POST['availableCategory']) && !empty($_POST['availableCategory'])){ $this->selectedCategories[] = get_post('availableCategory'); } + $this->selectedCategories = array_unique($this->selectedCategories); } // Remove categories @@ -248,7 +248,7 @@ class userFilterEditor extends plugin $o = substr_count($f, '('); $c = substr_count($f, ')'); if($o != $c){ - $msgs[] = sprintf(_("Please check your filter #%s. You have '%s' opening and '%s' closing brackets!"), ($key+1),$o, $c); + $msgs[] = sprintf(_("Error in filter #%s: %s opening and %s closing brackets detected!"), bold($key+1), bold($o), bold($c)); } } @@ -264,10 +264,10 @@ class userFilterEditor extends plugin { $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";