summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2017-03-26 17:22:21 +0200
committerRenato Botelho <renato@netgate.com>2017-04-20 16:04:09 -0300
commitfe91a918b23f36e17f223de30cef914e62e32196 (patch)
treeb94865e2d787fc85770c4b11052231f90e9921f4
parent4268377c37fe7b3b82504d875c10e689394b9e36 (diff)
downloadpfsense-fe91a918b23f36e17f223de30cef914e62e32196.zip
pfsense-fe91a918b23f36e17f223de30cef914e62e32196.tar.gz
ipsec webgui, move building the $iflabels array outside if the loop
(cherry picked from commit 11b9896609c2998106d5503fe2581bb3304b4a5f)
-rw-r--r--src/usr/local/www/vpn_ipsec.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/usr/local/www/vpn_ipsec.php b/src/usr/local/www/vpn_ipsec.php
index f3a0991..015ef24 100644
--- a/src/usr/local/www/vpn_ipsec.php
+++ b/src/usr/local/www/vpn_ipsec.php
@@ -289,8 +289,27 @@ display_top_tabs($tab_array);
</tr>
</thead>
<tbody class="p1-entries">
-<?php $i = 0; foreach ($a_phase1 as $ph1ent): ?>
<?php
+$iflabels = get_configured_interface_with_descr();
+$viplist = get_configured_vip_list();
+foreach ($viplist as $vip => $address) {
+ $iflabels[$vip] = $address;
+ if (get_vip_descr($address)) {
+ $iflabels[$vip] .= " (". get_vip_descr($address) .")";
+ }
+}
+$grouplist = return_gateway_groups_array();
+foreach ($grouplist as $name => $group) {
+ if ($group[0]['vip'] != "") {
+ $vipif = $group[0]['vip'];
+ } else {
+ $vipif = $group[0]['int'];
+ }
+ $iflabels[$name] = "GW Group {$name}";
+}
+
+$i = 0; foreach ($a_phase1 as $ph1ent):
+
$iconfn = "pass";
$entryStatus = (isset($ph1ent['disabled']) ? 'disabled' : 'enabled');
@@ -321,25 +340,6 @@ display_top_tabs($tab_array);
<td>
<?php
if ($ph1ent['interface']) {
- $iflabels = get_configured_interface_with_descr();
-
- $viplist = get_configured_vip_list();
- foreach ($viplist as $vip => $address) {
- $iflabels[$vip] = $address;
- if (get_vip_descr($address)) {
- $iflabels[$vip] .= " (". get_vip_descr($address) .")";
- }
- }
-
- $grouplist = return_gateway_groups_array();
- foreach ($grouplist as $name => $group) {
- if ($group[0]['vip'] != "") {
- $vipif = $group[0]['vip'];
- } else {
- $vipif = $group[0]['int'];
- }
- $iflabels[$name] = "GW Group {$name}";
- }
$if = htmlspecialchars($iflabels[$ph1ent['interface']]);
} else {
$if = "WAN";
OpenPOWER on IntegriCloud