diff options
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/system_firmware_check.php | 5 | ||||
-rw-r--r-- | usr/local/www/widgets/widgets/system_information.widget.php | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/usr/local/www/system_firmware_check.php b/usr/local/www/system_firmware_check.php index d981a29..e4ab116 100755 --- a/usr/local/www/system_firmware_check.php +++ b/usr/local/www/system_firmware_check.php @@ -131,9 +131,8 @@ if ($g['platform'] == "nanobsd") { $nanosize .= strtolower(trim(file_get_contents("/etc/nanosize.txt"))); } -@unlink("/tmp/{$g['product_name']}_version"); -download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version"); -$remote_version = trim(@file_get_contents("/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")); $static_text .= gettext("done") . "\\n"; if (!$remote_version) { $static_text .= gettext("Unable to check for updates.") . "\\n"; 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 { |