summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/usr/local/www/widgets/widgets/interface_statistics.widget.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/usr/local/www/widgets/widgets/interface_statistics.widget.php b/src/usr/local/www/widgets/widgets/interface_statistics.widget.php
index 8685f6c..be27757 100644
--- a/src/usr/local/www/widgets/widgets/interface_statistics.widget.php
+++ b/src/usr/local/www/widgets/widgets/interface_statistics.widget.php
@@ -65,6 +65,8 @@ require_once("pfsense-utils.inc");
require_once("functions.inc");
require_once("/usr/local/www/widgets/include/interface_statistics.inc");
+$ifdescrs = get_configured_interface_with_descr();
+
// Compose the table contents and pass it back to the ajax caller
if ($_REQUEST && $_REQUEST['ajax']) {
@@ -78,10 +80,6 @@ if ($_REQUEST && $_REQUEST['ajax']) {
'collisions' => gettext('Collisions'),
);
- $ifdescrs = get_configured_interface_with_descr();
- if (!is_array($ifdescrs)) {
- $ifdescrs = array();
- }
$skipinterfaces = explode(",", $user_settings['widgets']['interface_statistics']['iffilter']);
print("<thead>");
@@ -126,10 +124,6 @@ if ($_REQUEST && $_REQUEST['ajax']) {
exit;
} else if ($_POST) {
- $ifdescrs = get_configured_interface_with_descr();
- if (!is_array($ifdescrs)) {
- $ifdescrs = array();
- }
$validNames = array();
foreach ($ifdescrs as $ifdescr => $ifname) {
OpenPOWER on IntegriCloud