Commit ced78b04 authored by Franco Fichtner's avatar Franco Fichtner

openvpn: repair display of selected CRL

parent dfd53322
...@@ -817,21 +817,19 @@ endif; ?> ...@@ -817,21 +817,19 @@ endif; ?>
<option value="">None</option> <option value="">None</option>
<?php <?php
foreach ($config['crl'] as $crl) : foreach ($config['crl'] as $crl) :
if (isset($acrl['refid'])) { if (!isset($crl['refid'])) {
$selected = ""; continue;
$caname = ""; }
$ca = lookup_ca($crl['caref']); $ca = lookup_ca($crl['caref']);
if ($ca) { if ($ca) {
$caname = " (CA: {$ca['descr']})"; $caname = " (CA: {$ca['descr']})";
if ($pconfig['crlref'] == $crl['refid']) { $selected = '';
$selected = "selected=\"selected\""; if ($pconfig['crlref'] == $crl['refid']) {
} $selected = 'selected="selected"';
} }?>
}?> <option value="<?=htmlspecialchars($crl['refid']);?>" <?=$selected;?>><?=htmlspecialchars($crl['descr'] . $caname);?></option>
<option value="<?=htmlspecialchars($crl['refid']);?>" <?=$selected;?>>
<?=htmlspecialchars($crl['descr'] . $caname);?>
</option>
<?php <?php
}
endforeach; ?> endforeach; ?>
</select> </select>
<?php <?php
......
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