Commit ac9a263d authored by Franco Fichtner's avatar Franco Fichtner

openvpn: repair display of selected CRL

(cherry picked from commit ced78b04)
(cherry picked from commit 01f3c129)
parent 3c3f5453
......@@ -975,21 +975,15 @@ endif; ?>
<option value="">None</option>
<?php
foreach ($config['crl'] as $crl) :
if (isset($acrl['refid'])) {
$selected = "";
$caname = "";
if (!isset($crl['refid'])) {
continue;
}
$ca = lookup_ca($crl['caref']);
if ($ca) {
$caname = " (CA: {$ca['descr']})";
if ($pconfig['crlref'] == $crl['refid']) {
$selected = "selected=\"selected\"";
}
}
}?>
<option value="<?=htmlspecialchars($crl['refid']);?>" <?=$selected;?>>
<?=htmlspecialchars($crl['descr'] . $caname);?>
</option>
$selected = $pconfig['crlref'] == $crl['refid'] ? 'selected="selected"' : ''; ?>
<option value="<?=htmlspecialchars($crl['refid']);?>" <?=$selected;?>><?=htmlspecialchars("{$crl['descr']} ({$ca['descr']})");?></option>
<?php
}
endforeach; ?>
</select>
<?php
......@@ -1015,7 +1009,7 @@ endif; ?>
if (isset($cert['caref'])) {
$ca = lookup_ca($cert['caref']);
if (!empty($ca)) {
$caname = " (CA: {$ca['descr']})";
$caname = " ({$ca['descr']})";
}
}
if ($pconfig['certref'] == $cert['refid']) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment