]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/dns.cgi
Hardcode theme to ipfire
[ipfire-2.x.git] / html / cgi-bin / dns.cgi
index 762e77ff1da5d89aaa75361cc58e8410915b0446..7dc11358223774a6f2cab732c473afd7f95f7080 100755 (executable)
@@ -65,7 +65,7 @@ my $check_servers;
 my %color = ();
 my %mainsettings = ();
 &General::readhash("${General::swroot}/main/settings", \%mainsettings);
-&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
+&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
 
 &Header::showhttpheaders();
 &Header::getcgihash(\%cgiparams);
@@ -87,6 +87,10 @@ if ($cgiparams{'GENERAL'} eq $Lang::tr{'save'}) {
                $cgiparams{'ENABLE_SAFE_SEARCH'} = "off";
        }
 
+       if ($cgiparams{'ENABLE_SAFE_SEARCH_YOUTUBE'} ne "on") {
+               $cgiparams{'ENABLE_SAFE_SEARCH_YOUTUBE'} = "off";
+       }
+
        # Check if using ISP nameservers and TLS is enabled at the same time.
        if (($cgiparams{'USE_ISP_NAMESERVERS'} eq "on") && ($cgiparams{'PROTO'} eq "TLS")) {
                $errormessage = $Lang::tr{'dns isp nameservers and tls not allowed'}
@@ -259,6 +263,7 @@ if (($cgiparams{'SERVERS'} eq $Lang::tr{'save'}) || ($cgiparams{'SERVERS'} eq $L
 
 # Hash to store the generic DNS settings.
 my %settings = ();
+$settings{"ENABLE_SAFE_SEARCH_YOUTUBE"} = "on";
 
 # Read-in general DNS settings.
 &General::readhash("$settings_file", \%settings);
@@ -310,6 +315,10 @@ $checked{'ENABLE_SAFE_SEARCH'}{'off'} = '';
 $checked{'ENABLE_SAFE_SEARCH'}{'on'} = '';
 $checked{'ENABLE_SAFE_SEARCH'}{$settings{'ENABLE_SAFE_SEARCH'}} = "checked='checked'";
 
+$checked{'ENABLE_SAFE_SEARCH_YOUTUBE'}{'off'} = '';
+$checked{'ENABLE_SAFE_SEARCH_YOUTUBE'}{'on'} = '';
+$checked{'ENABLE_SAFE_SEARCH_YOUTUBE'}{$settings{'ENABLE_SAFE_SEARCH_YOUTUBE'}} = "checked='checked'";
+
 $selected{'PROTO'}{'UDP'} = '';
 $selected{'PROTO'}{'TLS'} = '';
 $selected{'PROTO'}{'TCP'} = '';
@@ -381,6 +390,16 @@ sub show_general_dns_configuration () {
                                </td>
                        </tr>
 
+                       <tr>
+                               <td width="33%">
+                                       &raquo; $Lang::tr{'dns enable safe-search youtube'}
+                               </td>
+
+                               <td>
+                                       <input type="checkbox" name="ENABLE_SAFE_SEARCH_YOUTUBE" $checked{'ENABLE_SAFE_SEARCH_YOUTUBE'}{'on'}>
+                               </td>
+                       </tr>
+
                        <tr>
                                <td colspan="2">
                                        <br>
@@ -606,7 +625,7 @@ END
                                        $rdns = gethostbyaddr($iaddr, AF_INET);
                                }
 
-                               if (!$rdns) { $rdns = $Lang::tr{'lookup failed'}; }
+                               if (!$rdns) { $rdns = $Lang::tr{'ptr lookup failed'}; }
 
                                # Mark ISP name servers as disabled
                                if ($id <= 2 && $enabled eq "disabled") {