summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 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");
OpenPOWER on IntegriCloud