Skip to content

Commit

Permalink
Suppress empty lines output during teleporter import (#1921)
Browse files Browse the repository at this point in the history
Signed-off-by: Yubiuser <[email protected]>
  • Loading branch information
yubiuser authored Oct 11, 2021
1 parent b27acd2 commit 49c84e5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/pi-hole/php/teleporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ function noun($num)

if(isset($_POST["localdnsrecords"]) && $file->getFilename() === "custom.list")
{
ob_start();
if($flushtables) {
// Defined in func.php included via auth.php
deleteAllCustomDNSEntries();
Expand All @@ -528,7 +529,7 @@ function noun($num)
if(addCustomDNSEntry($ip, $domain, false))
$num++;
}

ob_end_clean();
echo "Processed local DNS records (".$num.noun($num).")<br>\n";
if($num > 0) {
$importedsomething = true;
Expand All @@ -537,6 +538,7 @@ function noun($num)

if(isset($_POST["localcnamerecords"]) && $file->getFilename() === "05-pihole-custom-cname.conf")
{
ob_start();
if($flushtables) {
// Defined in func.php included via auth.php
deleteAllCustomCNAMEEntries();
Expand All @@ -556,7 +558,7 @@ function noun($num)
if(addCustomCNAMEEntry($domain, $target, false))
$num++;
}

ob_end_clean();
echo "Processed local CNAME records (".$num.noun($num).")<br>\n";
if($num > 0) {
$importedsomething = true;
Expand Down

0 comments on commit 49c84e5

Please sign in to comment.