From 43d45acebc837220c4fd70c40627281fc3369e5e Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 16 Nov 2016 13:42:21 +0100 Subject: [PATCH] firmware: simlify this, closing #343 in the process Prodded by weust on IRC, let's just make this redirect to the firmware page on link click abandoning the need to cache the update info in a suboptimal way. --- .../widgets/system_information.widget.php | 37 +------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/src/www/widgets/widgets/system_information.widget.php b/src/www/widgets/widgets/system_information.widget.php index ebe137030..79abf33ec 100644 --- a/src/www/widgets/widgets/system_information.widget.php +++ b/src/www/widgets/widgets/system_information.widget.php @@ -32,48 +32,13 @@ require_once("guiconfig.inc"); require_once("system.inc"); - -if (isset($_POST['getupdatestatus'])) { - $pkg_json = trim(configd_run('firmware check')); - if ($pkg_json != '') { - $pkg_status = json_decode($pkg_json, true); - } - - if (!isset($pkg_status) || $pkg_status["connection"]=="error") { - echo "".gettext("Connection Error")."
".gettext("Click to retry").""; - } elseif ($pkg_status["repository"]=="error") { - echo "".gettext("Repository Problem")."
".gettext("Click to retry").""; - } elseif ($pkg_status["updates"]=="0") { - echo "".gettext("Your system is up to date.")."
".gettext('Click to check for updates').""; - } else { - echo "".sprintf(gettext("There are %s update(s) available."),$pkg_status["updates"])."
".gettext("Click to upgrade")." | ".gettext('Re-check now').""; - } - - exit; -} ?> -