1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2025-07-08 20:57:40 +02:00

Simplify getVpnManaged check with ternary operator

This commit is contained in:
billz 2025-03-25 14:04:29 -07:00
parent 8d482845b0
commit 3d6b4e1f15

View File

@ -74,9 +74,7 @@ function DisplayDashboard(&$extraFooterScripts): void
$varName = "freq" . str_replace('.', '', $frequency) . "active";
$$varName = "active";
$vpnStatus = $vpn ? "active" : "inactive";
if ($vpn) {
$vpnManaged = $dashboard->getVpnManged($vpn);
}
$vpnManaged = $vpn ? $dashboard->getVpnManaged($vpn) : null;
$firewallManaged = $firewallStatus = "";
$firewallInstalled = array_filter($plugins, fn($p) => str_ends_with($p, 'Firewall')) ? true : false;
if (!$firewallInstalled) {