Skip to content
Snippets Groups Projects
Commit 43f11d13 authored by JediKev's avatar JediKev
Browse files

issue: System Ban List

This addresses an issue where the system banlist throws the error "SYSTEM
BAN LIST filter is DISABLED". This is due to the Filters moving to ORM but
not updating everywhere they are used.
parent 7b1eee83
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.
Please register or to comment