mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-12-26 23:26:47 +01:00
Use $wifi::SECURITY_OPEN constant
This commit is contained in:
@@ -50,7 +50,7 @@ function DisplayWPAConfig()
|
||||
} elseif (preg_match('/update(\d+)/', $post, $post_match)) {
|
||||
// NB, multiple protocols are separated with a forward slash ('/')
|
||||
$tmp_networks[$_POST['ssid' . $post_match[1]]] = array(
|
||||
'protocol' => ( $_POST['protocol' . $post_match[1]] === 'Open' ? 'Open' : 'WPA' ),
|
||||
'protocol' => ( $_POST['protocol' . $post_match[1]] === $wifi::SECURITY_OPEN ? $wifi::SECURITY_OPEN : 'WPA' ),
|
||||
'passphrase' => $_POST['passphrase' . $post_match[1]],
|
||||
'configured' => true
|
||||
);
|
||||
|
||||
@@ -10,7 +10,7 @@ $wifi = new WiFiManager();
|
||||
<?php if (strlen($network['ssid']) == 0) {
|
||||
$network['ssid'] = "(unknown)";
|
||||
} ?>
|
||||
<h5 class="card-title"><i class="fas fa-wifi me-2"></i><?php echo htmlspecialchars($network['ssidutf8'], ENT_QUOTES); ?></h5>
|
||||
<h5 class="card-title"><i class="fas fa-wifi me-2"></i><?php echo htmlspecialchars($network['ssidutf8'], ENT_QUOTES); ?></h5>
|
||||
<div class="info-item-wifi"><?php echo _("Status"); ?></div>
|
||||
<div>
|
||||
<?php if ($network['configured']) { ?>
|
||||
@@ -57,7 +57,7 @@ $wifi = new WiFiManager();
|
||||
<div class="mb-3">
|
||||
<div class="info-item-wifi mb-2"><?php echo _("Passphrase"); ?></div>
|
||||
<div class="input-group">
|
||||
<?php if ($network['protocol'] === 'Open') { ?>
|
||||
<?php if ($network['protocol'] === $wifi::SECURITY_OPEN) { ?>
|
||||
<input type="password" disabled class="form-control" aria-describedby="passphrase" name="passphrase<?php echo $index ?>" value="" />
|
||||
<?php } else { ?>
|
||||
<input type="password" class="form-control" aria-describedby="passphrase" name="passphrase<?php echo $index ?>" value="<?php echo htmlspecialchars($network['passphrase']); ?>" data-bs-target="#update<?php echo $index ?>" data-colors="#ffd0d0,#d0ffd0">
|
||||
|
||||
Reference in New Issue
Block a user