diff options
author | Steve Beaver <sbeaver@netgate.com> | 2017-08-21 10:40:47 -0400 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2017-08-21 10:40:47 -0400 |
commit | 0f2d956be7d14f87776727ab476a4e47a51f6646 (patch) | |
tree | c8f4aaaa107c64b6db684759659b54cc99e55fbf | |
parent | 96d3d096a3c4c4d4cbc81befde9dbb3977c30a55 (diff) | |
download | pfsense-0f2d956be7d14f87776727ab476a4e47a51f6646.zip pfsense-0f2d956be7d14f87776727ab476a4e47a51f6646.tar.gz |
Eliminate unused functions from functions.inc.php
-rw-r--r-- | src/usr/local/www/includes/functions.inc.php | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/src/usr/local/www/includes/functions.inc.php b/src/usr/local/www/includes/functions.inc.php index 46cfb24..b7a1e00 100644 --- a/src/usr/local/www/includes/functions.inc.php +++ b/src/usr/local/www/includes/functions.inc.php @@ -280,79 +280,4 @@ function get_load_average() { return $load_average[0]; } -function get_interfacestats() { - global $config; - //build interface list for widget use - $ifdescrs = get_configured_interface_list(); - - $array_in_packets = array(); - $array_out_packets = array(); - $array_in_bytes = array(); - $array_out_bytes = array(); - $array_in_errors = array(); - $array_out_errors = array(); - $array_collisions = array(); - $array_interrupt = array(); - $new_data = ""; - - //build data arrays - foreach ($ifdescrs as $ifdescr => $ifname) { - $ifinfo = get_interface_info($ifdescr); - $new_data .= "{$ifinfo['inpkts']},"; - $new_data .= "{$ifinfo['outpkts']},"; - $new_data .= format_bytes($ifinfo['inbytes']) . ","; - $new_data .= format_bytes($ifinfo['outbytes']) . ","; - if (isset($ifinfo['inerrs'])) { - $new_data .= "{$ifinfo['inerrs']},"; - $new_data .= "{$ifinfo['outerrs']},"; - } else { - $new_data .= "0,"; - $new_data .= "0,"; - } - if (isset($ifinfo['collisions'])) { - $new_data .= htmlspecialchars($ifinfo['collisions']) . ","; - } else { - $new_data .= "0,"; - } - }//end for - - return $new_data; -} - -function get_interfacestatus() { - $data = ""; - global $config; - - //build interface list for widget use - $ifdescrs = get_configured_interface_with_descr(); - - foreach ($ifdescrs as $ifdescr => $ifname) { - $ifinfo = get_interface_info($ifdescr); - $data .= $ifname . "^"; - if ($ifinfo['status'] == "up" || $ifinfo['status'] == "associated") { - $data .= "up"; - } else if ($ifinfo['status'] == "no carrier") { - $data .= "down"; - } else if ($ifinfo['status'] == "down") { - $data .= "block"; - } - $data .= "^"; - if ($ifinfo['ipaddr']) { - $data .= "<strong>" . htmlspecialchars($ifinfo['ipaddr']) . "</strong>"; - } - $data .= "^"; - if ($ifinfo['ipaddrv6']) { - $data .= "<strong>" . htmlspecialchars($ifinfo['ipaddrv6']) . "</strong>"; - } - $data .= "^"; - if ($ifinfo['status'] != "down") { - $data .= htmlspecialchars($ifinfo['media']); - } - - $data .= "~"; - - } - return $data; -} - ?> |