From: Stefan Schantl Date: Fri, 22 Apr 2022 03:44:23 +0000 (+0200) Subject: ids.cgi: Make the page lock in oinkmaster_web() function optional. X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=07dc722f611685c6018630f927ad4b65f44988d1 ids.cgi: Make the page lock in oinkmaster_web() function optional. This allows to call and release the page lock manually. Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 3ee66e06b1..c961c91bf8 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -1867,10 +1867,14 @@ sub _close_working_notice () { ## oinkmaster function, but provides a lot of HTML formated status output. # sub oinkmaster_web () { + my ($nolock) = @_; + my @enabled_providers = &IDS::get_enabled_providers(); # Lock the webpage and print message. - &_open_working_notice("$Lang::tr{'ids apply ruleset changes'}"); + unless ($nolock) { + &_open_working_notice("$Lang::tr{'ids apply ruleset changes'}"); + } # Check if the files in rulesdir have the correct permissions. &IDS::_check_rulesdir_permissions(); @@ -1908,7 +1912,9 @@ sub oinkmaster_web () { &_add_to_notice("$Lang::tr{'ids finished'}"); # Close the working notice. - &_close_working_notice(); + unless ($nolock) { + &_close_working_notice(); + } } #