From: Stefan Schantl Date: Tue, 5 Feb 2019 11:36:30 +0000 (+0100) Subject: ids.cgi: Fix downloading rules if source changed X-Git-Tag: v2.23-core131~117^2~73 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=5709768b0bab2b860911fcad66da8e0aec5c4eaa ids.cgi: Fix downloading rules if source changed Fix the if statement to detect wheater the ruleset has been changed and automatically download the new one. Fixes #11984. Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 56d39fd60b..151181fdc0 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -324,7 +324,7 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'save'}) { } # Check if a ruleset is present - if not or the source has been changed download it. - unless ((%idsrules) || ($oldsettings{'RULES'} eq $cgiparams{'RULES'})) { + if((! %idsrules) || ($oldsettings{'RULES'} ne $cgiparams{'RULES'})) { # Check if the red device is active. unless (-e "${General::swroot}/red/active") { $errormessage = "$Lang::tr{'could not download latest updates'} - $Lang::tr{'system is offline'}";