diff --git a/list.php b/list.php
index 9b71bd74..5efde479 100644
--- a/list.php
+++ b/list.php
@@ -11,7 +11,7 @@ $list = $_GET['l'];
if($list !== "white" && $list !== "black"){
echo "Invalid list parameter";
- require "footer.php";
+ require "scripts/pi-hole/php/footer.php";
die();
}
diff --git a/scripts/pi-hole/js/db_lists.js b/scripts/pi-hole/js/db_lists.js
index 9a7cdfbc..75a21746 100644
--- a/scripts/pi-hole/js/db_lists.js
+++ b/scripts/pi-hole/js/db_lists.js
@@ -90,7 +90,7 @@ function updateTopClientsChart() {
var url = clientname;
percentage = data.top_sources[client] / sum * 100.0;
clienttable.append("
| " + url +
- " | " + data.top_sources[client] + " | | " + data.top_sources[client] + " | | |
");
}
@@ -128,7 +128,7 @@ function updateTopDomainsChart() {
percentage = data.top_domains[domain] / sum * 100.0;
domaintable.append("
| " + domain +
- " | " + data.top_domains[domain] + " | | " + data.top_domains[domain] + " | | |
");
}
@@ -165,7 +165,7 @@ function updateTopAdsChart() {
}
percentage = data.top_ads[ad] / sum * 100.0;
- adtable.append("
| " + ad + " | " + data.top_ads[ad] + " | |
");
+ adtable.append("
| " + ad + " | " + data.top_ads[ad] + " | |
");
}
}
diff --git a/scripts/pi-hole/js/list.js b/scripts/pi-hole/js/list.js
index 1b01387c..664d64b2 100644
--- a/scripts/pi-hole/js/list.js
+++ b/scripts/pi-hole/js/list.js
@@ -143,8 +143,7 @@ function add(arg) {
method: "post",
data: {"domain":domain.val(), "list":locallistType, "token":token},
success: function(response) {
- if (response.indexOf("not a valid argument") >= 0 ||
- response.indexOf("is not a valid domain") >= 0) {
+ if (response.indexOf("] Pi-hole blocking is ") === -1) {
alFailure.show();
err.html(response);
alFailure.delay(4000).fadeOut(2000, function() {
diff --git a/scripts/pi-hole/php/auth.php b/scripts/pi-hole/php/auth.php
index a8a64e33..22cb459c 100644
--- a/scripts/pi-hole/php/auth.php
+++ b/scripts/pi-hole/php/auth.php
@@ -119,7 +119,7 @@ function check_csrf($token) {
function check_domain() {
if(isset($_POST['domain'])){
- $domains = explode(" ",$_POST['domain']);
+ $domains = preg_split('\s+', $_POST['domain']);
foreach($domains as $domain)
{
$validDomain = is_valid_domain_name($domain);
diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php
index f0387167..767e1a47 100644
--- a/scripts/pi-hole/php/header.php
+++ b/scripts/pi-hole/php/header.php
@@ -420,10 +420,10 @@ if($auth) {
active">
- Long term data
+ Long term data