From 347a81104743e31957868dc5dfaece5100b8397b Mon Sep 17 00:00:00 2001 From: Chris Pinkham Date: Fri, 10 Nov 2023 15:58:13 -0800 Subject: [PATCH] Show current Upgrade Source even if currently unreachable. Fixes #1626 --- www/about.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/about.php b/www/about.php index 4249a27ad..c55fd12ae 100644 --- a/www/about.php +++ b/www/about.php @@ -479,12 +479,18 @@ function UpdatePlatforms() { } else { $IPs = explode("\n", trim(shell_exec("/sbin/ifconfig -a | grep 'inet ' | awk '{print \$2}'"))); } + $found = 0; foreach ($remotes as $desc => $host) { if ((!in_array($host, $IPs)) && (!preg_match('/^169\.254\./', $host))) { $upgradeSources[$desc] = $host; + if (isset($settings['UpgradeSource']) && ($settings['UpgradeSource'] == $host)) + $found = 1; } } - $upgradeSources = array("github.com" => "github.com") + $upgradeSources; + if (!$found && isset($settings['UpgradeSource']) && ($settings['UpgradeSource'] != 'github.com')) + $upgradeSources = array($settings['UpgradeSource'] . ' (Unreachable)' => $settings['UpgradeSource'], 'github.com' => 'github.com') + $upgradeSources; + else + $upgradeSources = array("github.com" => "github.com") + $upgradeSources; ?> FPP Upgrade Source: