Commit e3d6b139 authored by Ad Schellevis's avatar Ad Schellevis

filter plugin, work in progress. add systemDefaults to plugin and add...

filter plugin, work in progress. add systemDefaults to plugin and add disablereplyto tag in there, so we can set this tag globally without having to link the config in the filter parsing logic.
This shouldn't hurt our current deployment, it's needed to add "reply-to" parsing in the rule class.
parent a206e8f6
......@@ -41,12 +41,16 @@ class Plugin
private $filterRules = array();
private $interfaceMapping = array();
private $gatewayMapping = array();
private $systemDefaults = array();
/**
* init firewall plugin component
*/
public function __construct()
{
if (!empty(Config::getInstance()->object()->system->disablereplyto)) {
$this->systemDefaults['disablereplyto'] = true;
}
}
/**
......@@ -154,6 +158,9 @@ class Plugin
*/
public function registerFilterRule($prio, $conf, $defaults = null)
{
if (!empty($this->systemDefaults)) {
$conf = array_merge($this->systemDefaults, $conf);
}
if ($defaults != null) {
$conf = array_merge($defaults, $conf);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment