X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Furlfilter.cgi;h=2d180e29292a5eedcd1a99e921351f4c506cc704;hp=f1862f1cf064f5ca27cfe1f1b57ba32ca5b66dbf;hb=847e6102c1163ca82f36d870cad0adb43e944ae4;hpb=310a18fab33a18d7ebf6b8d9f78ede1ae9606fcc diff --git a/html/cgi-bin/urlfilter.cgi b/html/cgi-bin/urlfilter.cgi index f1862f1cf0..2d180e2929 100644 --- a/html/cgi-bin/urlfilter.cgi +++ b/html/cgi-bin/urlfilter.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# Copyright (C) 2010 Michael Tremer & Christian Schmidt # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -2973,7 +2973,24 @@ sub writeconfigfile foreach $category (@categories) { $blacklist = $category; $category =~ s/\//_/g; - #if ( $filtersettings{"FILTER_".uc($category)} ne "on" ){next;} + + if ( $filtersettings{"FILTER_".uc($category)} ne "on" ){ + my $constraintrule = "false"; + + foreach (@tclist){ + chomp; + @tc = split(/\,/); + $tc[13] =~ s/\//_/g; + if ($tc[15] eq 'on' && $tc[13] =~ $category){ + $constraintrule = "true"; + } + } + + if ( $constraintrule eq "false"){ + next; + } + } + print FILE "dest $category {\n"; if (-e "$dbdir/$blacklist/domains") { print FILE " domainlist $blacklist\/domains\n";