From be1feb22e8273ecae94885f180a20deb76d0a4dc Mon Sep 17 00:00:00 2001 From: billz Date: Mon, 6 Nov 2023 15:05:30 +0000 Subject: [PATCH] Fix: dashboard interface stop/start button mismatch --- includes/dashboard.php | 7 +++---- templates/dashboard.php | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/includes/dashboard.php b/includes/dashboard.php index 0d80a8f4..ea307051 100755 --- a/includes/dashboard.php +++ b/includes/dashboard.php @@ -39,7 +39,6 @@ function DisplayDashboard(&$extraFooterScripts) $address = $inet[1]; $suffix = (int) $inet[2]; $netmask = long2ip(-1 << (32 - $suffix)); - $ipv4Addrs .= " $address"; $ipv4Netmasks .= " $netmask"; } @@ -157,7 +156,7 @@ function DisplayDashboard(&$extraFooterScripts) // Pressed stop button if ($interfaceState === 'UP') { $status->addMessage(sprintf(_('Interface is going %s.'), _('down')), 'warning'); - exec('sudo ip link set '.$_SESSION['wifi_client_interface'].' down'); + exec('sudo ip link set '.$_SESSION['ap_interface'].' down'); $wlan0up = false; $status->addMessage(sprintf(_('Interface is now %s.'), _('down')), 'success'); } elseif ($interfaceState === 'unknown') { @@ -169,8 +168,8 @@ function DisplayDashboard(&$extraFooterScripts) // Pressed start button if ($interfaceState === 'DOWN') { $status->addMessage(sprintf(_('Interface is going %s.'), _('up')), 'warning'); - exec('sudo ip link set ' .$_SESSION['wifi_client_interface']. ' up'); - exec('sudo ip -s a f label ' . $_SESSION['wifi_client_interface']); + exec('sudo ip link set ' .$_SESSION['ap_interface']. ' up'); + exec('sudo ip -s a f label ' .$_SESSION['ap_interface']); $wlan0up = true; $status->addMessage(sprintf(_('Interface is now %s.'), _('up')), 'success'); } elseif ($interfaceState === 'unknown') { diff --git a/templates/dashboard.php b/templates/dashboard.php index 3b727517..560de1ab 100755 --- a/templates/dashboard.php +++ b/templates/dashboard.php @@ -126,9 +126,9 @@ - " name="ifup_wlan0" /> + " name="ifup_wlan0" /> - " name="ifdown_wlan0" /> + " name="ifdown_wlan0" />