my %used_providers = ();
my $provider_includes_action;
+ # Value if oinkmaster has to be executed.
+ my $oinkmaster = "False";
+
# Only go further, if an ID has been passed.
if ($cgiparams{'ID'}) {
# Assign the given ID.
# Set the provider includes action to "add".
$provider_includes_action = "add";
+
+ # This operation requires to launch oinkmaster.
+ $oinkmaster = "True";
}
# Modify the status of the existing entry.
# add or remove the provider.
&IDS::alter_oinkmaster_provider_includes_file($provider_includes_action, $provider_handle);
+ # Check if oinkmaster has to be executed.
+ if ($oinkmaster eq "True") {
+ # Lock the webpage and print message.
+ &working_notice("$Lang::tr{'ids apply ruleset changes'}");
+
+ # Launch oinkmaster.
+ &IDS::oinkmaster();
+ }
+
# Check if the IDS is running.
if(&IDS::ids_is_running()) {
# Gather the amount of enabled providers (elements in the array).
# Undefine providers flag.
undef($cgiparams{'PROVIDERS'});
+
+ # Reload page.
+ &reload();
}
## Remove provider from the list of used providers.