]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/proxy.cgi
squid: Add french and spanish errorpages.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / proxy.cgi
index 55d7ec9e82aead0b8bd2ac3ac0242385fb2eb3f4..2525b6e2f60c241aaad619168f2b4059e34499db 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2009  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2010  IPFire Team  <info@ipfire.org>                          #
 #                                                                             #
 # 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        #
@@ -3075,19 +3075,12 @@ cache_mem $proxysettings{'CACHE_MEM'} MB
 END
        ;
 
-       if ($proxysettings{'CACHE_SIZE'} eq '0')
+       if ($proxysettings{'CACHE_SIZE'} ne '0')
        {
-               print FILE "cache_dir null /var/tmp\n\n";
-       } else {
                print FILE "cache_dir aufs /var/log/cache $proxysettings{'CACHE_SIZE'} $proxysettings{'L1_DIRS'} 256\n\n";
        }
 
-       if (($proxysettings{'ERR_DESIGN'} eq 'ipfire' ))
-       {
-               print FILE "error_directory $errordir.ipfire/$proxysettings{'ERR_LANGUAGE'}\n\n";
-       } else {
-               print FILE "error_directory $errordir/$proxysettings{'ERR_LANGUAGE'}\n\n";
-       }
+       print FILE "error_directory $errordir/$proxysettings{'ERR_LANGUAGE'}\n\n";
 
        if ($proxysettings{'OFFLINE_MODE'} eq 'on') {  print FILE "offline_mode on\n\n"; }
 
@@ -3374,8 +3367,7 @@ acl IPFire_no_access_mac arp "$acl_src_noaccess_mac"
 END
                ;
                print FILE "deny_info ";
-               if ((($proxysettings{'ERR_DESIGN'} eq 'ipfire') && (-e "$errordir.ipfire/$proxysettings{'ERR_LANGUAGE'}/ERR_ACCESS_DISABLED")) ||
-                   (($proxysettings{'ERR_DESIGN'} eq 'squid') && (-e "$errordir/$proxysettings{'ERR_LANGUAGE'}/ERR_ACCESS_DISABLED")))
+               if (($proxysettings{'ERR_DESIGN'} eq 'squid') && (-e "$errordir/$proxysettings{'ERR_LANGUAGE'}/ERR_ACCESS_DISABLED"))
                {
                        print FILE "ERR_ACCESS_DISABLED";
                } else {
@@ -3383,8 +3375,7 @@ END
                }
                print FILE " IPFire_no_access_ips\n";
                print FILE "deny_info ";
-               if ((($proxysettings{'ERR_DESIGN'} eq 'ipfire') && (-e "$errordir.ipfire/$proxysettings{'ERR_LANGUAGE'}/ERR_ACCESS_DISABLED")) ||
-                   (($proxysettings{'ERR_DESIGN'} eq 'squid') && (-e "$errordir/$proxysettings{'ERR_LANGUAGE'}/ERR_ACCESS_DISABLED")))
+               if (($proxysettings{'ERR_DESIGN'} eq 'squid') && (-e "$errordir/$proxysettings{'ERR_LANGUAGE'}/ERR_ACCESS_DISABLED"))
                {
                        print FILE "ERR_ACCESS_DISABLED";
                } else {
@@ -3888,7 +3879,11 @@ END
                        if (!-z $extgrp) { print FILE "reply_body_max_size 0 deny for_extended_users\n"; }
                }
        }
-#FIX ME        print FILE "reply_body_max_size $replybodymaxsize deny all\n\n";
+       
+       if ( $replybodymaxsize != '0' )
+       {
+               print FILE "reply_body_max_size $replybodymaxsize deny all\n\n";
+       }
 
        print FILE "visible_hostname";
        if ($proxysettings{'VISIBLE_HOSTNAME'} eq '')