mirror of
https://github.com/pi-hole/web.git
synced 2026-04-26 03:40:09 +01:00
Merge pull request #872 from pi-hole/release/v4.1
Update development with final v4.1 changes
This commit is contained in:
@@ -476,13 +476,13 @@ function readAdlists()
|
||||
{
|
||||
$adminemail = 'noadminemail';
|
||||
}
|
||||
elseif(!filter_var($adminemail, FILTER_VALIDATE_EMAIL))
|
||||
elseif(!filter_var($adminemail, FILTER_VALIDATE_EMAIL) || strpos($adminemail, "'") !== false)
|
||||
{
|
||||
$error .= "Administrator email address (".htmlspecialchars($adminemail).") is invalid!<br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
exec('sudo pihole -a -e '.$adminemail);
|
||||
exec('sudo pihole -a -e \''.$adminemail.'\'');
|
||||
}
|
||||
if(isset($_POST["boxedlayout"]))
|
||||
{
|
||||
@@ -696,8 +696,29 @@ function readAdlists()
|
||||
$level = intval($_POST["privacylevel"]);
|
||||
if($level >= 0 && $level <= 4)
|
||||
{
|
||||
// Check if privacylevel is already set
|
||||
if (isset($piholeFTLConf["PRIVACYLEVEL"])) {
|
||||
$privacylevel = intval($piholeFTLConf["PRIVACYLEVEL"]);
|
||||
} else {
|
||||
$privacylevel = 0;
|
||||
}
|
||||
|
||||
// Store privacy level
|
||||
exec("sudo pihole -a privacylevel ".$level);
|
||||
$success .= "The privacy level has been updated";
|
||||
|
||||
if($privacylevel > $level)
|
||||
{
|
||||
exec("sudo pihole -a restartdns");
|
||||
$success .= "The privacy level has been decreased and the DNS resolver has been restarted";
|
||||
}
|
||||
elseif($privacylevel < $level)
|
||||
{
|
||||
$success .= "The privacy level has been increased";
|
||||
}
|
||||
else
|
||||
{
|
||||
$success .= "The privacy level has been not been changed";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user