From 7bf0ce52d9a5f566c98cbd96bfe3ead2159d1cc6 Mon Sep 17 00:00:00 2001 From: Berger Alexander Date: Mon, 11 May 2015 08:32:35 +0200 Subject: fixed indent according to the style guide. --- usr/local/www/services_dhcp_edit.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'usr') diff --git a/usr/local/www/services_dhcp_edit.php b/usr/local/www/services_dhcp_edit.php index a8a6024..8bd9664 100644 --- a/usr/local/www/services_dhcp_edit.php +++ b/usr/local/www/services_dhcp_edit.php @@ -187,19 +187,19 @@ if ($_POST) { } /* check for overlaps */ - foreach ($a_maps as $mapent) { - if (isset($id) && ($a_maps[$id]) && ($a_maps[$id] === $mapent)) - continue; - /* The fully qualified hostname (hostname + '.' + domainname) must be unique. - The unqualified hostname does not have to be unique as long as the fully - qualified hostname is unique. */ + foreach ($a_maps as $mapent) { + if (isset($id) && ($a_maps[$id]) && ($a_maps[$id] === $mapent)) + continue; + /* The fully qualified hostname (hostname + '.' + domainname) must be unique. + * The unqualified hostname does not have to be unique as long as the fully + * qualified hostname is unique. */ $existingFqn = "{$mapent['hostname']}.{$mapent['domain']}"; - $candidateFqn = "{$_POST['hostname']}.{$_POST['domain']}"; - if ((($existingFqn == $candidateFqn) && $mapent['hostname']) || (($mapent['mac'] == $_POST['mac']) && $mapent['mac']) || (($mapent['ipaddr'] == $_POST['ipaddr']) && $mapent['ipaddr'] ) || (($mapent['cid'] == $_POST['cid']) && $mapent['cid'])) { - $input_errors[] = gettext("This fully qualified hostname (Hostname + Domainname), IP, MAC address or Client identifier already exists."); - break; - } - } + $candidateFqn = "{$_POST['hostname']}.{$_POST['domain']}"; + if ((($existingFqn == $candidateFqn) && $mapent['hostname']) || (($mapent['mac'] == $_POST['mac']) && $mapent['mac']) || (($mapent['ipaddr'] == $_POST['ipaddr']) && $mapent['ipaddr'] ) || (($mapent['cid'] == $_POST['cid']) && $mapent['cid'])) { + $input_errors[] = gettext("This fully qualified hostname (Hostname + Domainname), IP, MAC address or Client identifier already exists."); + break; + } + } /* make sure it's not within the dynamic subnet */ if ($_POST['ipaddr']) { -- cgit v1.1