diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2009-11-25 21:52:57 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2009-11-25 21:54:06 +0100 |
commit | 22275785b95216bdbfae08c05f87b9f0ae0da61b (patch) | |
tree | b1d6bc715a3306aa1612ddc560750f840a8a243d /usr | |
parent | c795339e573389fa10ca8ea307b2c45f56a3700b (diff) | |
download | pfsense-22275785b95216bdbfae08c05f87b9f0ae0da61b.zip pfsense-22275785b95216bdbfae08c05f87b9f0ae0da61b.tar.gz |
Make sure to display a correct bssid field instead of a truncated one. Going to great lengths here to prevent splitting on a fixed number of characters.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/status_wireless.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/www/status_wireless.php b/usr/local/www/status_wireless.php index 06b0c80..07cd737 100755 --- a/usr/local/www/status_wireless.php +++ b/usr/local/www/status_wireless.php @@ -114,8 +114,10 @@ display_top_tabs($tab_array); $counter=0; foreach($states as $state) { /* Split by Mac address for the SSID Field */ - $split = preg_split("/[ ]+[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:/i", $state); + $split = preg_split("/([0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f])/i", $state); + preg_match("/([0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f])/i", $state, $bssid); $ssid = $split[0]; + $bssid = $bssid[0]; /* Split the rest by using spaces for this line using the 2nd part */ $split = preg_split("/[ ]+/i", $split[1]); $bssid = $split[0]; |