From ed8dbfd10e13cbeb76b361bf1c3f19643291bec2 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 14 Jul 2018 15:34:42 +0200 Subject: [PATCH] Show number of processed items when importing whitelist, blacklist, and regex filters Signed-off-by: DL6ER --- scripts/pi-hole/php/teleporter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pi-hole/php/teleporter.php b/scripts/pi-hole/php/teleporter.php index 8f0a46e3..d11283df 100644 --- a/scripts/pi-hole/php/teleporter.php +++ b/scripts/pi-hole/php/teleporter.php @@ -108,7 +108,7 @@ if(isset($_POST["action"])) if(isset($_POST["blacklist"]) && $file->getFilename() === "blacklist.txt") { $blacklist = process_file(file_get_contents($file)); - echo "Processing blacklist.txt
\n"; + echo "Processing blacklist.txt (".count($blacklist)." entries)
\n"; exec("sudo pihole -b -nr --nuke"); exec("sudo pihole -b -q -nr ".implode(" ", $blacklist)); $importedsomething = true; @@ -116,7 +116,7 @@ if(isset($_POST["action"])) if(isset($_POST["whitelist"]) && $file->getFilename() === "whitelist.txt") { $whitelist = process_file(file_get_contents($file)); - echo "Processing whitelist.txt
\n"; + echo "Processing whitelist.txt (".count($whitelist)." entries)
\n"; exec("sudo pihole -w -nr --nuke"); exec("sudo pihole -w -q -nr ".implode(" ", $whitelist)); $importedsomething = true; @@ -125,7 +125,7 @@ if(isset($_POST["action"])) if(isset($_POST["regexlist"]) && $file->getFilename() === "regex.list") { $regexlist = process_file(file_get_contents($file),false); - echo "Processing regex.list
\n"; + echo "Processing regex.list (".count($regexlist)." entries)
\n"; exec("sudo pihole --regex -nr --nuke"); exec("sudo pihole --regex -q -nr ".implode(" ", $regexlist)); $importedsomething = true;