diff options
author | Phil Davis <phil.davis@inf.org> | 2015-12-15 23:00:44 +0545 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-12-15 12:25:11 -0500 |
commit | 8f65151c5beaee62d661af81bf96a93edaae22d9 (patch) | |
tree | f629ac10993774b9390f4eb5e95f8524661a020b /src/usr/local/www/system_advanced_sysctl.php | |
parent | 2e3732ecdd5e9fa8bbc540729b869d99d00a45ad (diff) | |
download | pfsense-8f65151c5beaee62d661af81bf96a93edaae22d9.zip pfsense-8f65151c5beaee62d661af81bf96a93edaae22d9.tar.gz |
Code style System Advanced
Diffstat (limited to 'src/usr/local/www/system_advanced_sysctl.php')
-rw-r--r-- | src/usr/local/www/system_advanced_sysctl.php | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/usr/local/www/system_advanced_sysctl.php b/src/usr/local/www/system_advanced_sysctl.php index 8d1e0b0..822bb49 100644 --- a/src/usr/local/www/system_advanced_sysctl.php +++ b/src/usr/local/www/system_advanced_sysctl.php @@ -143,7 +143,7 @@ if ($_POST) { $tunableent = array(); - if(!$_POST['tunable'] || !isset($_POST['value'])) { + if (!$_POST['tunable'] || !isset($_POST['value'])) { $input_errors[] = gettext("Both a name and a value must be specified."); } else if (!ctype_alnum($_POST['value'])) { $input_errors[] = gettext("The value may contain alphanumeric characters only."); @@ -169,14 +169,17 @@ if ($_POST) { $pgtitle = array(gettext("System"), gettext("Advanced"), gettext("System Tunables")); include("head.inc"); -if ($input_errors) +if ($input_errors) { print_input_errors($input_errors); +} -if ($savemsg) +if ($savemsg) { print_info_box($savemsg, 'success'); +} -if (is_subsystem_dirty('sysctl') && ($act != "edit" )) +if (is_subsystem_dirty('sysctl') && ($act != "edit" )) { print_info_box_np(gettext("The firewall tunables have changed. You must apply the configuration for them to take affect.")); +} $tab_array = array(); $tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php"); @@ -187,7 +190,7 @@ $tab_array[] = array(gettext("System Tunables"), true, "system_advanced_sysctl.p $tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php"); display_top_tabs($tab_array); -if ($act != "edit" ): ?> +if ($act != "edit"): ?> <div class="panel panel-default"> <div class="panel-heading"> <h2 class="panel-title"><?=gettext('System Tunables'); ?></h2> @@ -204,15 +207,21 @@ if ($act != "edit" ): ?> <th><a class="btn btn-xs btn-primary" href="system_advanced_sysctl.php?act=edit"><?=gettext('New'); ?></a></th> </tr> </thead> - <?php foreach ($tunables as $i => $tunable): - if (!isset($tunable['modified'])) - $i = $tunable['tunable']; ?> + <?php + foreach ($tunables as $i => $tunable): + if (!isset($tunable['modified'])) { + $i = $tunable['tunable']; + } + ?> <tr> <td><?=$tunable['tunable']; ?></td> <td><?=$tunable['descr']; ?></td> <td><?=$tunable['value']; ?> - <?php if($tunable['value'] == "default") - echo "(" . get_default_sysctl_value($tunable['tunable']) . ")"; ?> + <?php + if ($tunable['value'] == "default") { + echo "(" . get_default_sysctl_value($tunable['tunable']) . ")"; + } + ?> </td> <td> <a class="fa fa-pencil" title="<?=gettext("Edit tunable"); ?>" href="system_advanced_sysctl.php?act=edit&id=<?=$i;?>"></a> |