mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Unambiguously typecast to expected datatype
This commit is contained in:
parent
cc6fa1d8d0
commit
5457855aa1
@ -9,6 +9,7 @@ if (isset($_POST['interface'])) {
|
|||||||
define( 'NL80211_BAND_24GHZ', 0x1 );
|
define( 'NL80211_BAND_24GHZ', 0x1 );
|
||||||
define( 'NL80211_BAND_5GHZ', 0x2 );
|
define( 'NL80211_BAND_5GHZ', 0x2 );
|
||||||
$iface = escapeshellcmd($_POST['interface']);
|
$iface = escapeshellcmd($_POST['interface']);
|
||||||
|
$flags = 0;
|
||||||
|
|
||||||
// get physical device for selected interface
|
// get physical device for selected interface
|
||||||
exec("iw dev | awk '/$iface/ {print line}{line = $0}'", $return);
|
exec("iw dev | awk '/$iface/ {print line}{line = $0}'", $return);
|
||||||
|
@ -49,7 +49,7 @@ class Sysinfo
|
|||||||
public function usedMemory()
|
public function usedMemory()
|
||||||
{
|
{
|
||||||
$used = shell_exec("free -m | awk 'NR==2{ total=$2 ; used=$3 } END { print used/total*100}'");
|
$used = shell_exec("free -m | awk 'NR==2{ total=$2 ; used=$3 } END { print used/total*100}'");
|
||||||
return floor($used);
|
return floor(intval($used));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function processorCount()
|
public function processorCount()
|
||||||
|
Loading…
Reference in New Issue
Block a user