]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
ids.cgi: Move the section to customize the IDS ruleset to a function.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 20 Mar 2021 15:58:11 +0000 (16:58 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Tue, 3 Aug 2021 17:25:42 +0000 (19:25 +0200)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi

index 51d6b5f35c689ecef303c053ecdb07fcabaa0c70..394136c1fc7ea30fc48436c1b4867e7432a08004 100644 (file)
@@ -1094,6 +1094,16 @@ END
 
 # Only show the section for configuring the ruleset if one is present.
 if (%idsrules) {
+       &show_customize_ruleset();
+}
+
+&Header::closebigbox();
+&Header::closepage();
+
+#
+## Function to show the customize ruleset section.
+#
+sub show_customize_ruleset() {
        # Load neccessary perl modules for file stat and to format the timestamp.
        use File::stat;
        use POSIX qw( strftime );
@@ -1211,9 +1221,6 @@ END
        &Header::closebox();
 }
 
-&Header::closebigbox();
-&Header::closepage();
-
 #
 ## A function to display a notice, to lock the webpage and
 ## tell the user which action currently will be performed.