ids.cgi: Only show "update ruleset" button if a ruleset is present
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 30 Jan 2019 08:39:17 +0000 (09:39 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Wed, 30 Jan 2019 08:39:17 +0000 (09:39 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi

index 1bb193a..61993a2 100644 (file)
@@ -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'}'>