]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
urlfilter.cgi: Fixes bug#10649 - calls urlfilterctrl with remove option if update...
authorAdolf Belka <adolf.belka@ipfire.org>
Tue, 26 Sep 2023 14:07:01 +0000 (16:07 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 28 Sep 2023 09:39:26 +0000 (09:39 +0000)
- When the url filter update enable checkbox is unchecked then this patch calls
   urlfilterctrl with the remove option added in the otrher patch of this series.
- Tested on my vm testbed that this change does remove the urlfilter symlink from the
   fcron directories when the update is disabled.

Fixes: Bug#10649
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/urlfilter.cgi

index 1e54372f18fc173350ff8ba83376d0da978d103d..1ced06e26bdd546b7d3ec738e85bb3e926f4dc28 100644 (file)
@@ -982,6 +982,11 @@ if ($filtersettings{'ACTION'} eq $Lang::tr{'urlfilter save schedule'})
                {
                        &General::system('/usr/local/bin/urlfilterctrl', 'cron', 'monthly');
                }
+               
+               if ($filtersettings{'ENABLE_AUTOUPDATE'} eq 'off')
+               {
+                       &General::system('/usr/local/bin/urlfilterctrl', 'cron', 'remove');
+               }
        }
 }