summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system_advanced_notifications.php
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2017-04-10 22:48:37 +0200
committerPiBa-NL <pba_2k3@yahoo.com>2017-04-10 22:48:37 +0200
commit64f8ec62ddd57241e4a8a755cade7ca8cd9196a6 (patch)
treed3c7479fa7f1ca4ea4afc733943b582a4b581fbc /src/usr/local/www/system_advanced_notifications.php
parent23c4e67e5bc3bb7bb06666cd3e83d9aadba23d2f (diff)
downloadpfsense-64f8ec62ddd57241e4a8a755cade7ca8cd9196a6.zip
pfsense-64f8ec62ddd57241e4a8a755cade7ca8cd9196a6.tar.gz
notify test buttons for smtp/growl should use new unsaved settings just made
Diffstat (limited to 'src/usr/local/www/system_advanced_notifications.php')
-rw-r--r--src/usr/local/www/system_advanced_notifications.php10
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 3c3eaaa..de08bd2 100644
--- a/src/usr/local/www/system_advanced_notifications.php
+++ b/src/usr/local/www/system_advanced_notifications.php
@@ -88,7 +88,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'];
@@ -152,7 +154,7 @@ if ($_POST) {
unset($config['system']['disablebeep']);
}
- if (!$input_errors) {
+ if (!$input_errors && !$testsmtp && !$testgrowl) {
write_config();
pfSenseHeader("system_advanced_notifications.php");
@@ -161,7 +163,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");
@@ -176,7 +178,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");
OpenPOWER on IntegriCloud