]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/urlfilter.cgi
Rootfile update: initscripts.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / urlfilter.cgi
index 5ae2d8dc7a74b74e021934e595d7a5683b6fbf5e..6e99397ec0c40ce40c0375d7b7b2e95b69d155a5 100644 (file)
@@ -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        #
@@ -59,7 +59,7 @@ my $tcfile = "${General::swroot}/urlfilter/timeconst";
 my $uqfile = "${General::swroot}/urlfilter/userquota";
 my $dbdir = "${General::swroot}/urlfilter/blacklists";
 my $editdir = "${General::swroot}/urlfilter/editor";
-my $repository = "/home/httpd/html/repository";
+my $repository = "/var/urlrepo";
 my $hintcolour = '#FFFFCC';
 
 my $sourceurlfile = "${General::swroot}/urlfilter/autoupdate/autoupdate.urls";
@@ -1443,12 +1443,6 @@ print <<END
        <td class='base'>$Lang::tr{'urlfilter msg text 3'}:&nbsp;<img src='/blob.gif' alt='*' /></td>
        <td><input type='text' name='MSG_TEXT_3' value='$filtersettings{'MSG_TEXT_3'}' size='40' /></td>
 </tr>
-<tr>
-       <td class='base'>$Lang::tr{'urlfilter enable jpeg'}:</td>
-       <td><input type='checkbox' name='ENABLE_JPEG' $checked{'ENABLE_JPEG'}{'on'} /></td>
-       <td>&nbsp;</td>
-       <td>&nbsp;</td>
-</tr>
 </table>
 <hr size='1'>
 <table width='100%'>
@@ -2979,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";