summaryrefslogtreecommitdiffstats
path: root/usr/local/www/widgets/widgets/system_information.widget.php
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-07-31 10:03:34 -0300
committerRenato Botelho <renato@netgate.com>2015-07-31 10:03:34 -0300
commit5779ade6707ba530517da239d9ec3fc751d17d83 (patch)
tree9295a06ae80c1dd54611e7c279c42e3e242a6790 /usr/local/www/widgets/widgets/system_information.widget.php
parent6fed300c6ae8c5bcac03f867daf737e2676dcc30 (diff)
downloadpfsense-5779ade6707ba530517da239d9ec3fc751d17d83.zip
pfsense-5779ade6707ba530517da239d9ec3fc751d17d83.tar.gz
Introduce a new item to $g global, 'product_version' and stop reading /etc/version all around
Diffstat (limited to 'usr/local/www/widgets/widgets/system_information.widget.php')
-rw-r--r--usr/local/www/widgets/widgets/system_information.widget.php5
1 files changed, 2 insertions, 3 deletions
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 "<br /><br />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 "<br /><br />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 "<br /><span class=\"red\" id=\"updatealert\"><b>Update available. </b></span><a href=\"/system_firmware_check.php\">Click Here</a> to view update.";
echo "\n<script type=\"text/javascript\">\n";
echo "//<![CDATA[\n";
@@ -124,7 +123,7 @@ $filesystems = get_mounted_filesystems();
<tr>
<td width="25%" valign="top" class="vncellt"><?=gettext("Version");?></td>
<td width="75%" class="listr">
- <strong><?php readfile("/etc/version"); ?></strong>
+ <strong><?=$g['product_version']?></strong>
(<?php echo php_uname("m"); ?>)
<br />
built on <?php readfile("/etc/version.buildtime"); ?>
OpenPOWER on IntegriCloud