summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-08-11 10:27:25 -0300
committerRenato Botelho <renato@netgate.com>2017-08-15 13:26:23 -0300
commite65e4744db2596cec9232504fbd991f3951c77e4 (patch)
tree629361e446cc7ed6467da4dafd3cc758a79f1f09 /src
parent38aca28596d34d865e16eea4cc566f1520b93455 (diff)
downloadpfsense-e65e4744db2596cec9232504fbd991f3951c77e4.zip
pfsense-e65e4744db2596cec9232504fbd991f3951c77e4.tar.gz
Show user when pkg metadata was updated
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/widgets/widgets/system_information.widget.php24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/usr/local/www/widgets/widgets/system_information.widget.php b/src/usr/local/www/widgets/widgets/system_information.widget.php
index 4e60dbb..3e1714e 100644
--- a/src/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/src/usr/local/www/widgets/widgets/system_information.widget.php
@@ -87,11 +87,15 @@ $sysinfo_items = array(
if ($_REQUEST['getupdatestatus']) {
require_once("pkg-utils.inc");
+ $cache_file = $g['version_cache_file'];
+
if (isset($config['system']['firmware']['disablecheck'])) {
exit;
}
- $system_version = get_system_pkg_version();
+ /* If $_REQUEST['getupdatestatus'] == 2, force update */
+ $system_version = get_system_pkg_version(false,
+ ($_REQUEST['getupdatestatus'] == 1));
if ($system_version === false) {
print(gettext("<i>Unable to check for updates</i>"));
@@ -119,16 +123,28 @@ if ($_REQUEST['getupdatestatus']) {
<?php
break;
case '=':
- print(gettext("The system is on the latest version."));
+ printf('<span class="text-success">%s</span>' . "\n",
+ gettext("The system is on the latest version."));
break;
case '>':
- print(gettext("The system is on a later version than<br />the official release."));
+ printf("%s\n", gettext(
+ "The system is on a later version than official release."));
break;
default:
- print(gettext( "<i>Error comparing installed version<br />with latest available</i>"));
+ printf("<i>%s</i>\n", gettext(
+ "Error comparing installed with latest version available"));
break;
}
+ if (file_exists($cache_file)):
+?>
+ <div>
+ <?printf("%s %s", gettext("Version information updated at"),
+ date("Y-m-d H:i", filemtime($cache_file)));?>
+ </div>
+<?php
+ endif;
+
exit;
} elseif ($_POST) {
OpenPOWER on IntegriCloud