summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Dale <sdale@pfsense.org>2008-07-08 00:14:25 +0000
committerScott Dale <sdale@pfsense.org>2008-07-08 00:14:25 +0000
commitb7cf86b05d4092cf09a574b7b6d1a01e4b68f6bf (patch)
treebc08d047932605229103283adba291a684fd28de /usr
parent6aed99d0f4bbab29bbc81dae8fcd468632590727 (diff)
downloadpfsense-b7cf86b05d4092cf09a574b7b6d1a01e4b68f6bf.zip
pfsense-b7cf86b05d4092cf09a574b7b6d1a01e4b68f6bf.tar.gz
show error correctly and display current version is up to date
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/widgets/widgets/system_information.widget.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php
index 93f0069..b8a2ed5 100644
--- a/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/usr/local/www/widgets/widgets/system_information.widget.php
@@ -64,8 +64,7 @@ $curcfg = $config['system']['firmware'];
$latest_version = download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version");
if(strstr($latest_version,"404")) {
- echo "Unable to check for updates.";
- exit;
+ echo "<br /><br />Unable to check for updates.";
}
else {
$current_installed_pfsense_version = str_replace("\n", "", file_get_contents("/etc/version"));
@@ -76,12 +75,19 @@ $curcfg = $config['system']['firmware'];
if($current_installed_pfsense_version <> $latest_version)
$needs_system_upgrade = true;
- if($needs_system_upgrade) {
- echo "<br /><br /><span class=\"red\" id=\"updatealert\"><b>Update available. </b></span><a href=\"/system_firmware_check.php\">Click Here</a> to view update.";
- echo "<script type=\"text/javascript\">";
- echo "Effect.Pulsate('updatealert', { pulses: 30, duration: 10});";
- echo "</script>";
- }
+ if(!$latest_version) {
+ echo "<br /><br />Unable to check for updates.";
+ }
+ else {
+ if($needs_system_upgrade) {
+ echo "<br /><br /><span class=\"red\" id=\"updatealert\"><b>Update available. </b></span><a href=\"/system_firmware_check.php\">Click Here</a> to view update.";
+ echo "<script type=\"text/javascript\">";
+ echo "Effect.Pulsate('updatealert', { pulses: 30, duration: 10});";
+ echo "</script>";
+ }
+ else
+ echo "You are on the latest version.";
+ }
}
?>
</td>
OpenPOWER on IntegriCloud