summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/vpn_ipsec_settings.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-01-03 10:50:22 +0545
committerPhil Davis <phil.davis@inf.org>2017-01-03 10:50:22 +0545
commit44c423566b6eff18ec43ee77edddb94e3a3aa858 (patch)
treeec35ff8f9243236c75e9b120b80a2f62251ad5d8 /src/usr/local/www/vpn_ipsec_settings.php
parent46c06ade87cbea59d1113a23a5d91f15dab9048c (diff)
downloadpfsense-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/vpn_ipsec_settings.php')
-rw-r--r--src/usr/local/www/vpn_ipsec_settings.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/usr/local/www/vpn_ipsec_settings.php b/src/usr/local/www/vpn_ipsec_settings.php
index 4360837..3bcfa1d 100644
--- a/src/usr/local/www/vpn_ipsec_settings.php
+++ b/src/usr/local/www/vpn_ipsec_settings.php
@@ -172,15 +172,9 @@ if ($_POST) {
write_config();
+ $changes_applied = true;
$retval = 0;
- $retval = filter_configure();
- if (stristr($retval, "error") <> true) {
- $savemsg = get_std_save_message(gettext($retval));
- $class = 'success';
- } else {
- $savemsg = gettext($retval);
- $class = 'warning';
- }
+ $retval |= filter_configure();
vpn_ipsec_configure($needsrestart);
@@ -220,8 +214,8 @@ function maxmss_checked(obj) {
</script>
<?php
-if ($savemsg) {
- print_info_box($savemsg, $class);
+if ($changes_applied) {
+ print_apply_result_box($retval);
}
if ($input_errors) {
OpenPOWER on IntegriCloud