mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-19 15:32:59 +02:00
ids.cgi: Improve add provider logic
Do not longer add unsupported/removed providers as an option when adding a new/first ruleset provider. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
4e8225a778
commit
ad0d064a48
@@ -1711,6 +1711,12 @@ END
|
||||
# Grab the provider handle.
|
||||
my $provider = $tmphash{$provider_name};
|
||||
|
||||
# Check if we are not in edit mode.
|
||||
if ($cgiparams{'PROVIDERS'} ne "$Lang::tr{'edit'}") {
|
||||
# Skip unsupported ruleset provider.
|
||||
next unless(exists($IDS::Ruleset::Providers{$provider}{"dl_url"}));
|
||||
}
|
||||
|
||||
# Pre-select the provider if one is given.
|
||||
if (($used_providers{$cgiparams{'ID'}}[0] eq "$provider") || ($cgiparams{'PROVIDER'} eq "$provider")) {
|
||||
$selected{$provider} = "selected='selected'";
|
||||
|
||||
Reference in New Issue
Block a user