diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2009-11-24 21:37:01 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2009-11-24 21:37:01 +0100 |
commit | 105bb6a683616483cb3920b38ea5971d67c33214 (patch) | |
tree | 044454ced12ed0ac9106aa15633ecbff22484d0c /usr/local | |
parent | 0a595d8419b9f41637f20ac4b923d1bdfa3e053a (diff) | |
download | pfsense-105bb6a683616483cb3920b38ea5971d67c33214.zip pfsense-105bb6a683616483cb3920b38ea5971d67c33214.tar.gz |
Fix wireless stations list
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/status_wireless.php | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/usr/local/www/status_wireless.php b/usr/local/www/status_wireless.php index f1f70f3..06b0c80 100755 --- a/usr/local/www/status_wireless.php +++ b/usr/local/www/status_wireless.php @@ -153,28 +153,26 @@ display_top_tabs($tab_array); print "<td><b><font color='#ffffff'>ERP</td>"; print "</tr>\n\n"; + $states = array(); exec("/sbin/ifconfig {$if}_wlan0 list sta 2>&1", $states, $ret); array_shift($states); $counter=0; foreach($states as $state) { - $state_fixed = str_replace(" ", " ", $state); - $state_fixed = str_replace(" ", " ", $state_fixed); - $state_fixed = str_replace(" ", " ", $state_fixed); - $state_split = split(" ", $state_fixed); + $split = preg_split("/[ ]+/i", $state); + /* Split the rest by using spaces for this line using the 2nd part */ print "<tr>"; - print "<td>{$state_split[0]}</td>"; - print "<td>{$state_split[1]}</td>"; - print "<td>{$state_split[2]}</td>"; - print "<td>{$state_split[3]}</td>"; - print "<td>{$state_split[4]}</td>"; - print "<td>{$state_split[5]}</td>"; - print "<td>{$state_split[6]}</td>"; - print "<td>{$state_split[7]}</td>"; - print "<td>{$state_split[8]}</td>"; - print "<td>{$state_split[9]}</td>"; + print "<td>{$split[0]}</td>"; + print "<td>{$split[1]}</td>"; + print "<td>{$split[2]}</td>"; + print "<td>{$split[3]}</td>"; + print "<td>{$split[4]}</td>"; + print "<td>{$split[5]}</td>"; + print "<td>{$split[6]}</td>"; + print "<td>{$split[7]}</td>"; + print "<td>{$split[8]}</td>"; + print "<td>{$split[9]}</td>"; print "</tr>\n"; - print "<!-- $state_fixed -->\n"; } /* XXX: what stats to we get for adhoc mode? */ |