diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2017-04-10 22:48:37 +0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-04-20 15:57:30 -0300 |
commit | 4268377c37fe7b3b82504d875c10e689394b9e36 (patch) | |
tree | c7977742c6296084de4faf8d1c39e4a6cf47cc72 /src/usr/local | |
parent | 79a2945a2c54f3f9864326f1f2dad3a58c11f485 (diff) | |
download | pfsense-4268377c37fe7b3b82504d875c10e689394b9e36.zip pfsense-4268377c37fe7b3b82504d875c10e689394b9e36.tar.gz |
notify test buttons for smtp/growl should use new unsaved settings just made
(cherry picked from commit 64f8ec62ddd57241e4a8a755cade7ca8cd9196a6)
Diffstat (limited to 'src/usr/local')
-rw-r--r-- | src/usr/local/www/system_advanced_notifications.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/usr/local/www/system_advanced_notifications.php b/src/usr/local/www/system_advanced_notifications.php index d8851c9..ec56cc9 100644 --- a/src/usr/local/www/system_advanced_notifications.php +++ b/src/usr/local/www/system_advanced_notifications.php @@ -120,7 +120,9 @@ if ($_POST) { unset($input_errors); $pconfig = $_POST; - if (isset($_POST['save'])) { + $testgrowl = isset($_POST['test-growl']); + $testsmtp = isset($_POST['test-smtp']); + if (isset($_POST['save']) || $testsmtp || $testgrowl) { // Growl $config['notifications']['growl']['ipaddress'] = $_POST['ipaddress']; @@ -194,7 +196,7 @@ if ($_POST) { unset($config['system']['disablebeep']); } - if (!$input_errors) { + if (!$input_errors && !$testsmtp && !$testgrowl) { write_config(); pfSenseHeader("system_advanced_notifications.php"); @@ -203,7 +205,7 @@ if ($_POST) { } - if (isset($_POST['test-growl'])) { + if ($testgrowl) { // Send test message via growl if (isset($config['notifications']['growl']['ipaddress'])) { unlink_if_exists($g['vardb_path'] . "/growlnotices_lastmsg.txt"); @@ -212,7 +214,7 @@ if ($_POST) { } } - if (isset($_POST['test-smtp'])) { + if ($testsmtp) { // Send test message via smtp if (file_exists("/var/db/notices_lastmsg.txt")) { unlink("/var/db/notices_lastmsg.txt"); |