mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-16 05:53:00 +02:00
ids.cgi: Only show "update ruleset" button if a ruleset is present
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -826,19 +826,10 @@ print <<END
|
||||
<td align='right'>
|
||||
END
|
||||
;
|
||||
# Check if a ruleset source has been configured yet.
|
||||
unless($rulessettings{'RULES'}) {
|
||||
# If no ruleset settings have been saved yet, disable the button to download / update the ruleset.
|
||||
print"<input type='submit' name='RULESET' disabled='disabled' value='$Lang::tr{'download new ruleset'}'>\n";
|
||||
} else {
|
||||
# Ruleset setting have been saved. - Check if a ruleset already is downloaded.
|
||||
# Check if a ruleset has been downloaded yet.
|
||||
if (%idsrules) {
|
||||
# Allow to press the button and show it as "update ruleset".
|
||||
# Display button to update the ruleset.
|
||||
print"<input type='submit' name='RULESET' value='$Lang::tr{'update ruleset'}'>\n";
|
||||
} else {
|
||||
# Also allow to press the button, but show it as "download new ruleset".
|
||||
print"<input type='submit' name='RULESET' value='$Lang::tr{'download new ruleset'}'>\n";
|
||||
}
|
||||
}
|
||||
print <<END;
|
||||
<input type='submit' name='RULESET' value='$Lang::tr{'save'}'>
|
||||
|
||||
Reference in New Issue
Block a user