From 5779ade6707ba530517da239d9ec3fc751d17d83 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 31 Jul 2015 10:03:34 -0300 Subject: Introduce a new item to $g global, 'product_version' and stop reading /etc/version all around --- usr/local/www/widgets/widgets/system_information.widget.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'usr/local/www/widgets/widgets/system_information.widget.php') diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php index 6143ac1..231f2ee 100644 --- a/usr/local/www/widgets/widgets/system_information.widget.php +++ b/usr/local/www/widgets/widgets/system_information.widget.php @@ -66,13 +66,12 @@ if ($_REQUEST['getupdatestatus']) { echo "

Unable to check for updates."; } else { $current_installed_buildtime = trim(file_get_contents("/etc/version.buildtime")); - $current_installed_version = trim(file_get_contents("/etc/version")); if (!$remote_version) { echo "

Unable to check for updates."; } else { $needs_system_upgrade = false; - if (pfs_version_compare($current_installed_buildtime, $current_installed_version, $remote_version) == -1) { + if (pfs_version_compare($current_installed_buildtime, $g['product_version'], $remote_version) == -1) { echo "
Update available. Click Here to view update."; echo "\n