]> git.ipfire.org Git - people/pmueller/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>
Sun, 19 Dec 2021 12:21:51 +0000 (13:21 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi

index f3f408b31efd0d92536b905d5d596c307ae42f72..478b2ff1542c243c6027929cb487bef6c83e4ec2 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 );
@@ -1213,9 +1223,6 @@ END
        }
 }
 
-&Header::closebigbox();
-&Header::closepage();
-
 #
 ## A function to display a notice, to lock the webpage and
 ## tell the user which action currently will be performed.