mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-22 07:30:23 +00:00
Fix SSID consisting of multiple words
This commit is contained in:
parent
438ab94309
commit
c87253a06b
1 changed files with 3 additions and 3 deletions
|
@ -64,7 +64,7 @@ function getClients($simple=true) {
|
|||
$cl["device"][$i]["isAP"] = !empty($retiw);
|
||||
unset($retiw);
|
||||
exec("iw dev $dev link 2> /dev/null",$retiw);
|
||||
if(!$simple && !empty($ssid=preg_only_match("/.*SSID: (\w*).*/",$retiw)) ) {
|
||||
if(!$simple && !empty($ssid=preg_only_match("/.*SSID: ([\w ]*).*/",$retiw)) ) {
|
||||
$cl["device"][$i]["connected"] = "y";
|
||||
$cl["device"][$i]["ssid"] = $ssid;
|
||||
$cl["device"][$i]["ap-mac"] = preg_only_match("/^Connected to ([0-9a-f\:]*).*$/",$retiw);
|
||||
|
@ -212,8 +212,8 @@ function setClientState($state) {
|
|||
}
|
||||
break;
|
||||
case "ppp":
|
||||
if($state == "up") exec('ipup '.$dev["name"]);
|
||||
if(!empty($connected) && $state == "down") exec('ipup '.$dev["name"]);
|
||||
if($state == "up") exec('sudo ifup '.$dev["name"]);
|
||||
if(!empty($connected) && $state == "down") exec('sudo ifdown '.$dev["name"]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue