diff options
author | Phil Davis <phil.davis@inf.org> | 2015-12-16 23:16:58 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-12-16 23:16:58 +0545 |
commit | 6e3488e958f8f1e548962a7f07cca8f45f106a46 (patch) | |
tree | faa73d19c44557e5de589a0384f3f9e64af948ab /src/usr/local/www/services_dnsmasq_edit.php | |
parent | e84865c8c5d72b44000aee8c1c3cf97c22686f9d (diff) | |
download | pfsense-6e3488e958f8f1e548962a7f07cca8f45f106a46.zip pfsense-6e3488e958f8f1e548962a7f07cca8f45f106a46.tar.gz |
Code style services dhcp dnsmasq dyndns
Diffstat (limited to 'src/usr/local/www/services_dnsmasq_edit.php')
-rw-r--r-- | src/usr/local/www/services_dnsmasq_edit.php | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/usr/local/www/services_dnsmasq_edit.php b/src/usr/local/www/services_dnsmasq_edit.php index 0cc0ee5..8bc1ac4 100644 --- a/src/usr/local/www/services_dnsmasq_edit.php +++ b/src/usr/local/www/services_dnsmasq_edit.php @@ -80,8 +80,9 @@ function hosts_sort() { require("guiconfig.inc"); -if (!is_array($config['dnsmasq']['hosts'])) +if (!is_array($config['dnsmasq']['hosts'])) { $config['dnsmasq']['hosts'] = array(); +} $a_hosts = &$config['dnsmasq']['hosts']; @@ -137,12 +138,10 @@ if ($_POST) { if (!substr_compare('aliashost', $key, 0, 9)) { $entry = substr($key, 9); $field = 'host'; - } - elseif (!substr_compare('aliasdomain', $key, 0, 11)) { + } elseif (!substr_compare('aliasdomain', $key, 0, 11)) { $entry = substr($key, 11); $field = 'domain'; - } - elseif (!substr_compare('aliasdescription', $key, 0, 16)) { + } elseif (!substr_compare('aliasdescription', $key, 0, 16)) { $entry = substr($key, 16); $field = 'description'; } @@ -213,28 +212,30 @@ if ($_POST) { } // Delete a row in the options table -if($_GET['act'] == "delopt") { +if ($_GET['act'] == "delopt") { $idx = $_GET['id']; - if($pconfig['aliases'] && is_array($pconfig['aliases']['item'][$idx])) { + if ($pconfig['aliases'] && is_array($pconfig['aliases']['item'][$idx])) { unset($pconfig['aliases']['item'][$idx]); } } // Add an option row -if($_GET['act'] == "addopt") { - if(!is_array($pconfig['aliases']['item'])) +if ($_GET['act'] == "addopt") { + if (!is_array($pconfig['aliases']['item'])) { $pconfig['aliases']['item'] = array(); + } array_push($pconfig['aliases']['item'], array('host' => null, 'domain' => null, 'description' => null)); } -$pgtitle = array(gettext("Services"),gettext("DNS Forwarder"),gettext("Edit Host Override")); +$pgtitle = array(gettext("Services"), gettext("DNS Forwarder"), gettext("Edit Host Override")); $shortcut_section = "forwarder"; include("head.inc"); -if ($input_errors) +if ($input_errors) { print_input_errors($input_errors); +} $form = new Form(); @@ -283,15 +284,15 @@ $form->add($section); $section = new Form_Section('Additional names for this host'); -if(!$pconfig['aliases']['item']) { +if (!$pconfig['aliases']['item']) { $pconfig['aliases']['item'] = array('host' => ""); } -if( $pconfig['aliases']['item']) { +if ($pconfig['aliases']['item']) { $counter = 0; $last = count($pconfig['aliases']['item']) - 1; - foreach($pconfig['aliases']['item'] as $item) { + foreach ($pconfig['aliases']['item'] as $item) { $group = new Form_Group(null); $group->addClass('repeatable'); |