summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorScott Dale <sdale@pfsense.org>2008-07-05 00:40:41 +0000
committerScott Dale <sdale@pfsense.org>2008-07-05 00:40:41 +0000
commit5e657bbb33c640e84a46b518ea8fdf9533ad3ed2 (patch)
tree7201078d969a03a0e5ba028bb1a002b02b4233c2 /usr/local
parente862ba62b9c9d9ca2e395e40bd2dde559705bb28 (diff)
downloadpfsense-5e657bbb33c640e84a46b518ea8fdf9533ad3ed2.zip
pfsense-5e657bbb33c640e84a46b518ea8fdf9533ad3ed2.tar.gz
remove un-needed code, refine update check error
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/widgets/widgets/system_information.widget.php42
1 files changed, 16 insertions, 26 deletions
diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php
index 7b65b0b..93f0069 100644
--- a/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/usr/local/www/widgets/widgets/system_information.widget.php
@@ -55,43 +55,33 @@ $curcfg = $config['system']['firmware'];
<br />
<?=`uname -sr`?>
- <?php
- /* Define necessary variables. */
- $firmware_version = trim(file_get_contents('/etc/version'));
-
- $static_text = "Downloading current version information... ";
- update_output_window($static_text);
-
- $static_text .= "done.\n";
- update_output_window($static_text);
-
+ <?php //display available firmware version
if(isset($curcfg['alturl']['enable']))
$updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}";
else
$updater_url = $g['update_url'];
- update_status("Downloading current version information...");
$latest_version = download_file_with_progress_bar("{$updater_url}/version", "/tmp/{$g['product_name']}_version");
if(strstr($latest_version,"404")) {
- update_output_window("Could not download version information file {$updater_url}/version");
- include("fend.inc");
+ echo "Unable to check for updates.";
exit;
}
-
- $current_installed_pfsense_version = str_replace("\n", "", file_get_contents("/etc/version"));
- $latest_version = str_replace("\n", "", file_get_contents("/tmp/{$g['product_name']}_version"));
-
- $needs_system_upgrade = false;
- if($current_installed_pfsense_version <> $latest_version)
- $needs_system_upgrade = true;
-
+ else {
+ $current_installed_pfsense_version = str_replace("\n", "", file_get_contents("/etc/version"));
+ $latest_version = str_replace("\n", "", file_get_contents("/tmp/{$g['product_name']}_version"));
+
+ $needs_system_upgrade = false;
- 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($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>";
+ }
}
?>
</td>
OpenPOWER on IntegriCloud