1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Fix index of known networks

Index now stored in the network array
This commit is contained in:
zbchristian 2021-08-31 16:57:46 +02:00 committed by GitHub
parent 8778d225ac
commit 7df8f68621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,12 +14,11 @@
</div>
<?php endif ?>
<?php $index = 0; ?>
<?php if (!empty($connected)): ?>
<h4 class="h-underlined my-3"><?php echo _("Connected") ?></h4>
<div class="card-grid">
<?php foreach ($connected as $network) : ?>
<?php $index = isset($network['index']) ? $network['index'] : -1; ?>
<?php echo renderTemplate("wifi_stations/network", compact('network', 'index')) ?>
<?php $index++; ?>
<?php endforeach ?>
@ -30,6 +29,7 @@
<h4 class="h-underlined my-3"><?php echo _("Known") ?></h4>
<div class="card-grid">
<?php foreach ($known as $network) : ?>
<?php $index = isset($network['index']) ? $network['index'] : -1; ?>
<?php echo renderTemplate("wifi_stations/network", compact('network', 'index')) ?>
<?php $index++; ?>
<?php endforeach ?>
@ -40,6 +40,7 @@
<h4 class="h-underlined my-3"><?php echo _("Nearby") ?></h4>
<div class="card-grid">
<?php foreach ($nearby as $network) : ?>
<?php $index = isset($network['index']) ? $network['index'] : -1; ?>
<?php echo renderTemplate("wifi_stations/network", compact('network', 'index')) ?>
<?php $index++; ?>
<?php endforeach ?>