Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress empty lines during teleporter import #1921

Merged
merged 1 commit into from
Oct 11, 2021
Merged

Conversation

yubiuser
Copy link
Member

  • I have read and understood the contributors guide, as well as this entire template.
  • I have made only one major change in my proposed changes.
  • I have commented my proposed changes within the code.
  • I have tested my proposed changes.
  • I am willing to help maintain this change if there are issues with it later.
  • I give this submission freely and claim no ownership.
  • It is compatible with the EUPL 1.2 license
  • I have squashed any insignificant commits. (git rebase)
  • I have Signed Off all commits. (git commit --signoff)

What does this PR aim to accomplish?:

During Teleporter import deleteAllCustomDNSEntries, addCustomDNSEntry, deleteAllCustomCNAMEEntries and addCustomCNAMEEntry are called. They all finish by calling

https://github.com/pi-hole/AdminLTE/blob/5588be9c9086ec120cd3bd4dc36bc9d4ed0acd77/scripts/pi-hole/php/func.php#L432

which outputs <br> if $json is not true (which it never is during teleporter import)

https://github.com/pi-hole/AdminLTE/blob/5588be9c9086ec120cd3bd4dc36bc9d4ed0acd77/scripts/pi-hole/php/func.php#L459-L467

So for every entry in Local DNS records or CNAME Records an empty line is printed.

This PR does suppress the output by using output_buffer.

Before
Bildschirmfoto zu 2021-10-10 22-02-01

After
Bildschirmfoto zu 2021-10-10 22-10-50

@yubiuser yubiuser added the PR: Approval Required Open Pull Request, needs approval label Oct 10, 2021
Copy link
Member

@PromoFaux PromoFaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix conflicts

@yubiuser
Copy link
Member Author

Done.

@PromoFaux PromoFaux merged commit 49c84e5 into devel Oct 11, 2021
@PromoFaux PromoFaux deleted the suppress_void branch October 11, 2021 08:05
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-ftl-v5-11-web-v5-8-and-core-v5-6-released/50566/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Approval Required Open Pull Request, needs approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants