Commit 5c7fc297 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) whitespace / style fixes vpn_ipsec_phase1.php

parent 258831f4
......@@ -43,17 +43,17 @@ function ipsec_ikeid_used($ikeid) {
global $config;
foreach ($config['ipsec']['phase1'] as $ph1ent)
if( $ikeid == $ph1ent['ikeid'] )
if( $ikeid == $ph1ent['ikeid'] ) {
return true;
}
return false;
}
function ipsec_ikeid_next() {
$ikeid = 1;
while(ipsec_ikeid_used($ikeid))
while(ipsec_ikeid_used($ikeid)) {
$ikeid++;
}
return $ikeid;
}
......@@ -145,9 +145,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig[$fieldname] = null;
}
}
}
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
$a_phase1 = &$config['ipsec']['phase1'];
if (isset($_POST['p1index']) && is_numericint($_POST['p1index'])) {
......@@ -220,11 +218,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (!empty($pconfig['remote-gateway'])) {
if (!is_ipaddr($pconfig['remote-gateway']) && !is_domain($pconfig['remote-gateway'])) {
$input_errors[] = gettext("A valid remote gateway address or host name must be specified.");
} elseif (is_ipaddrv4($pconfig['remote-gateway']) && ($pconfig['protocol'] != "inet"))
} elseif (is_ipaddrv4($pconfig['remote-gateway']) && ($pconfig['protocol'] != "inet")) {
$input_errors[] = gettext("A valid remote gateway IPv4 address must be specified or you need to change protocol to IPv6");
elseif (is_ipaddrv6($pconfig['remote-gateway']) && ($pconfig['protocol'] != "inet6"))
} elseif (is_ipaddrv6($pconfig['remote-gateway']) && ($pconfig['protocol'] != "inet6")) {
$input_errors[] = gettext("A valid remote gateway IPv6 address must be specified or you need to change protocol to IPv4");
}
}
if ((!empty($pconfig['remote-gateway']) && is_ipaddr($pconfig['remote-gateway']) && !isset($pconfig['disabled']) )) {
$t = 0;
......
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