diff --git a/scripts/pi-hole/php/footer.php b/scripts/pi-hole/php/footer.php index 3bb1cae2..fa59bcf8 100644 --- a/scripts/pi-hole/php/footer.php +++ b/scripts/pi-hole/php/footer.php @@ -48,6 +48,12 @@ flush(); // - determines local branch each time, // - determines local and remote version every 30 minutes require 'scripts/pi-hole/php/update_checker.php'; + +if (isset($core_commit) || isset($web_commit) || isset($FTL_commit)) { + $list_class = 'list-unstyled'; +} else { + $list_class = 'list-inline'; +} ?> diff --git a/scripts/pi-hole/php/update_checker.php b/scripts/pi-hole/php/update_checker.php index 9f0645ab..d47aafa6 100644 --- a/scripts/pi-hole/php/update_checker.php +++ b/scripts/pi-hole/php/update_checker.php @@ -82,16 +82,30 @@ if (!is_readable($versionsfile)) { } // URLs for the links -$coreUrl = 'https://github.com/pi-hole/pi-hole'; -$dockerUrl = 'https://github.com/pi-hole/docker-pi-hole'; -$ftlUrl = 'https://github.com/pi-hole/FTL'; -$webUrl = 'https://github.com/pi-hole/AdminLTE'; -$coreReleasesUrl = $coreUrl.'/releases'; -$webReleasesUrl = $webUrl.'/releases'; -$ftlReleasesUrl = $ftlUrl.'/releases'; -$dockerReleasesUrl = $dockerUrl.'/releases'; +$coreUrl = 'https://github.com/pi-hole/pi-hole/releases'; +$webUrl = 'https://github.com/pi-hole/AdminLTE/releases'; +$ftlUrl = 'https://github.com/pi-hole/FTL/releases'; +$dockerUrl = 'https://github.com/pi-hole/docker-pi-hole/releases'; // Version strings -$coreVersionStr = $core_current.(isset($core_commit) ? ' ('.$core_branch.', '.$core_commit.')' : ''); -$webVersionStr = $web_current.(isset($web_commit) ? ' ('.$web_branch.', '.$web_commit.')' : ''); -$ftlVersionStr = $FTL_current.(isset($FTL_commit) ? ' ('.$FTL_branch.', '.$FTL_commit.')' : ''); +// If "vDev" show branch/commit, else show link +$coreVersionStr = $core_current; +if (isset($core_commit)) { + $coreVersionStr .= ' ('.$core_branch.', '.$core_commit.')'; +} else { + $coreVersionStr = ''.$core_current.''; +} + +$webVersionStr = $web_current; +if (isset($web_commit)) { + $webVersionStr .= ' ('.$web_branch.', '.$web_commit.')'; +} else { + $webVersionStr = ''.$web_current.''; +} + +$ftlVersionStr = $FTL_current; +if (isset($FTL_commit)) { + $ftlVersionStr .= ' ('.$FTL_branch.', '.$FTL_commit.')'; +} else { + $ftlVersionStr = ''.$FTL_current.''; +}