diff options
author | Phil Davis <phil.davis@inf.org> | 2017-01-03 10:50:22 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2017-01-03 10:50:22 +0545 |
commit | 44c423566b6eff18ec43ee77edddb94e3a3aa858 (patch) | |
tree | ec35ff8f9243236c75e9b120b80a2f62251ad5d8 /src/usr/local/www/services_igmpproxy.php | |
parent | 46c06ade87cbea59d1113a23a5d91f15dab9048c (diff) | |
download | pfsense-44c423566b6eff18ec43ee77edddb94e3a3aa858.zip pfsense-44c423566b6eff18ec43ee77edddb94e3a3aa858.tar.gz |
Report problems applying changes
1) Strictly keep track of the accumulating $retval from calls to various
functions that apply changes.
2) Use new function print_apply_result_box() to print a suitable message
in a suitable severity based on $retval
Diffstat (limited to 'src/usr/local/www/services_igmpproxy.php')
-rw-r--r-- | src/usr/local/www/services_igmpproxy.php | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/usr/local/www/services_igmpproxy.php b/src/usr/local/www/services_igmpproxy.php index f3b8775..5de6aa1 100644 --- a/src/usr/local/www/services_igmpproxy.php +++ b/src/usr/local/www/services_igmpproxy.php @@ -42,15 +42,10 @@ $a_igmpproxy = &$config['igmpproxy']['igmpentry']; if ($_POST) { $pconfig = $_POST; + $changes_applied = true; $retval = 0; /* reload all components that use igmpproxy */ - $retval = services_igmpproxy_configure(); - - if (stristr($retval, "error") <> true) { - $savemsg = get_std_save_message($retval); - } else { - $savemsg = $retval; - } + $retval |= services_igmpproxy_configure(); clear_subsystem_dirty('igmpproxy'); } @@ -68,8 +63,8 @@ if ($_GET['act'] == "del") { $pgtitle = array(gettext("Services"), gettext("IGMP Proxy")); include("head.inc"); -if ($savemsg) { - print_info_box($savemsg, 'success'); +if ($changes_applied) { + print_apply_result_box($retval); } if (is_subsystem_dirty('igmpproxy')) { |