mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 00:50:29 +00:00
Fix display of non-ASCII SSID
This commit is contained in:
parent
3aa564cdec
commit
7344c323ee
4 changed files with 5 additions and 2 deletions
|
@ -14,6 +14,7 @@ knownWifiStations($networks);
|
|||
nearbyWifiStations($networks, !isset($_REQUEST["refresh"]));
|
||||
connectedWifiStations($networks);
|
||||
sortNetworksByRSSI($networks);
|
||||
foreach ($networks as $ssid => $network) $networks[$ssid]["ssidutf8"] = ssid2utf8( $ssid );
|
||||
|
||||
$connected = array_filter($networks, function($n) { return $n['connected']; } );
|
||||
$known = array_filter($networks, function($n) { return !$n['connected'] && $n['configured']; } );
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
require_once 'includes/functions.php';
|
||||
require_once 'includes/wifi_functions.php';
|
||||
|
||||
function getClients($simple=true)
|
||||
{
|
||||
|
@ -73,6 +74,7 @@ function getClients($simple=true)
|
|||
if (!$simple && !empty($ssid=preg_only_match("/.*SSID:\s*([^\"]*).*/", $retiw)) ) {
|
||||
$cl["device"][$i]["connected"] = "y";
|
||||
$cl["device"][$i]["ssid"] = $ssid;
|
||||
$cl["device"][$i]["ssidutf8"] = ssid2utf8($ssid);
|
||||
$cl["device"][$i]["ap-mac"] = preg_only_match("/^Connected to ([0-9a-f\:]*).*$/", $retiw);
|
||||
$sig = preg_only_match("/.*signal: (.*)$/", $retiw);
|
||||
$val = preg_only_match("/^([0-9\.-]*).*$/", $sig);
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<?php $valEcho=function($cl,$id) {$val = isset($cl[$id])&& !empty($cl[$id]) ? $cl[$id] : "-"; echo htmlspecialchars($val,ENT_QUOTES);} ?>
|
||||
<?php if ($clientinfo["type"] == "wlan") : // WIRELESS ?>
|
||||
<div class="row mb-1">
|
||||
<div class="info-item col-xs-3"><?php echo _("Connected To"); ?></div><div class="info-value col-xs-3"><?php $valEcho($clientinfo,"ssid"); ?></div>
|
||||
<div class="info-item col-xs-3"><?php echo _("Connected To"); ?></div><div class="info-value col-xs-3"><?php $valEcho($clientinfo,"ssidutf8"); ?></div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<div class="info-item col-xs-3"><?php echo _("AP Mac Address"); ?></div><div class="info-value col-xs-3"><?php $valEcho($clientinfo,"ap-mac"); ?></div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<?php if (strlen($network['ssid']) == 0) {
|
||||
$network['ssid'] = "(unknown)";
|
||||
} ?>
|
||||
<h5 class="card-title"><?php echo htmlspecialchars($network['ssid'], ENT_QUOTES); ?></h5>
|
||||
<h5 class="card-title"><?php echo htmlspecialchars($network['ssidutf8'], ENT_QUOTES); ?></h5>
|
||||
|
||||
<div class="info-item-wifi"><?php echo _("Status"); ?></div>
|
||||
<div>
|
||||
|
|
Loading…
Reference in a new issue