Correct displayed configuration name

This commit is contained in:
zbchristian 2021-06-12 14:36:03 +02:00 committed by GitHub
parent f721c08dc9
commit a963c0564f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,14 +12,14 @@
$conf_default = empty($ret) ? "none" : $ret[0];
?>
<?php foreach ($clients as $client) :
if ($client == "client.conf") {
$label = file_get_meta(RASPI_OPENVPN_CLIENT_CONFIG,'#\sfilename\s(.*)');
if ($client == $conf_default) {
$btn_class = "active";
} else {
$btn_class = "disabled";
}
$label = preg_replace('/_client$/','',pathinfo($client, PATHINFO_FILENAME));
$client = $label;
$btn_class = "disabled";
}?>
?>
<div class="row mt-2" id="openvpn-client-row-<?php echo htmlspecialchars($client, ENT_QUOTES); ?>" >
<div class="col-md-6 col-xs-4">
<label><?php echo htmlspecialchars($label, ENT_QUOTES); ?></label>