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
1 changed files with 5 additions and 5 deletions

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 {
$label = preg_replace('/_client$/','',pathinfo($client, PATHINFO_FILENAME));
$client = $label;
$btn_class = "disabled";
}?>
}
$label = preg_replace('/_client$/','',pathinfo($client, PATHINFO_FILENAME));
$client = $label;
?>
<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>