summaryrefslogtreecommitdiffstats
path: root/usr/local/www/widgets/widgets/system_information.widget.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-02-13 11:14:26 -0500
committerjim-p <jimp@pfsense.org>2011-02-13 11:14:26 -0500
commitd164643a3560174bf1caabef4649b5b2a382b8ff (patch)
treefa249a162684a799c94654a23433cb61c1a9b5aa /usr/local/www/widgets/widgets/system_information.widget.php
parentb43b7613919b6e3c7ab0059704177993fde59894 (diff)
downloadpfsense-d164643a3560174bf1caabef4649b5b2a382b8ff.zip
pfsense-d164643a3560174bf1caabef4649b5b2a382b8ff.tar.gz
Make update check a little more robust. Timeout after a few seconds, and if we get a non-200 http code, ignore the response.
Diffstat (limited to 'usr/local/www/widgets/widgets/system_information.widget.php')
-rw-r--r--usr/local/www/widgets/widgets/system_information.widget.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php
index 90dcb36..c5f63ce 100644
--- a/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/usr/local/www/widgets/widgets/system_information.widget.php
@@ -49,9 +49,9 @@ if($_REQUEST['getupdatestatus']) {
}
@unlink("/tmp/{$g['product_name']}_version");
- download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version");
+ if (download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version", 5, 5))
+ $remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version"));
- $remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version"));
if(empty($remote_version))
echo "<br /><br />Unable to check for updates.";
else {
OpenPOWER on IntegriCloud