only print hostname in title if gethostname function returns a valid hostname

Signed-off-by: 8633brown <toddbrown.8633@yahoo.co.uk>
This commit is contained in:
8633brown
2020-02-12 22:16:05 -07:00
parent 908c24c6c5
commit 8d60ef30f5

View File

@@ -176,7 +176,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://api.github.com; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'">
<title>Pi-hole - <?php echo gethostname() ?></title>
<title>Pi-hole<?php if (gethostname()) {echo " - ", gethostname();} ?></title>
<!-- Usually browsers proactively perform domain name resolution on links that the user may choose to follow. We disable DNS prefetching here -->
<meta http-equiv="x-dns-prefetch-control" content="off">
<meta http-equiv="cache-control" content="max-age=60,private">