Skip to content
Snippets Groups Projects
Unverified Commit a23aca0f authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #4706 from JediKev/issue/ban-list

issue: System Ban List
parents ce354618 43f11d13
No related branches found
No related tags found
No related merge requests found
...@@ -81,7 +81,7 @@ class Banlist { ...@@ -81,7 +81,7 @@ class Banlist {
} }
function getSystemBanList() { function getSystemBanList() {
return new Filter(self::ensureSystemBanList()); return self::ensureSystemBanList();
} }
static function getFilter() { static function getFilter() {
......
...@@ -184,7 +184,8 @@ extends VerySimpleModel { ...@@ -184,7 +184,8 @@ extends VerySimpleModel {
$rule = array_merge($extra,array('what'=>$what, 'how'=>$how, 'val'=>$val)); $rule = array_merge($extra,array('what'=>$what, 'how'=>$how, 'val'=>$val));
$rule = new FilterRule($rule); $rule = new FilterRule($rule);
$this->rules->add($rule); $this->rules->add($rule);
$rule->save(); if ($rule->save())
return true;
} }
function removeRule($what, $how, $val) { function removeRule($what, $how, $val) {
...@@ -200,7 +201,7 @@ extends VerySimpleModel { ...@@ -200,7 +201,7 @@ extends VerySimpleModel {
} }
function getRuleById($id) { function getRuleById($id) {
return FilterRule::lookup($id, $this->getId()); return FilterRule::lookup(array('id'=>$id, 'filter_id'=>$this->getId()));
} }
function containsRule($what, $how, $val) { function containsRule($what, $how, $val) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment