summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-04-17 21:56:11 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-04-17 21:56:49 -0400
commitaddbcae775ae23b6fa41d76c419cd54f73c22d8b (patch)
treea458bc88553f66581dd51c875b163ca251a9dc05
parent1467b79f5565f4ca907a9468f1924c59940aa36b (diff)
downloadpfsense-addbcae775ae23b6fa41d76c419cd54f73c22d8b.zip
pfsense-addbcae775ae23b6fa41d76c419cd54f73c22d8b.tar.gz
Fix growl issues.
Ticket #518 Ticket #519 Submibtted-by: Blake Skinner
-rw-r--r--etc/inc/notices.inc13
-rw-r--r--usr/local/www/system_advanced_notifications.php27
2 files changed, 37 insertions, 3 deletions
diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc
index 51605db..6880844 100644
--- a/etc/inc/notices.inc
+++ b/etc/inc/notices.inc
@@ -346,9 +346,12 @@ function notify_via_growl($message) {
global $config;
$growl_ip = $config['notifications']['growl']['ipaddress'];
$growl_password = $config['notifications']['growl']['password'];
+ $growl_name = $config['notifications']['growl']['name'];
+ $growl_notification = $config['notifications']['growl']['notification_name'];
+
if(!empty($growl_ip)) {
- $growl = new Growl($growl_ip, $growl_password);
- $growl->notify("pfSense growl alert", "pfSense", "{$message}");
+ $growl = new Growl($growl_ip, $growl_password, $growl_name);
+ $growl->notify("{$growl_notification}", "pfSense", "{$message}");
}
}
@@ -365,8 +368,12 @@ function register_via_growl() {
global $config;
$growl_ip = $config['notifications']['growl']['ipaddress'];
$growl_password = $config['notifications']['growl']['password'];
+ $growl_name = $config['notifications']['growl']['name'];
+ $growl_notification = $config['notifications']['growl']['notification_name'];
+
if($growl_ip) {
- $growl = new Growl($growl_ip, $growl_password);
+ $growl = new Growl($growl_ip, $growl_password, $growl_name);
+ $growl->addNotification($growl_notification);
$growl->register();
}
}
diff --git a/usr/local/www/system_advanced_notifications.php b/usr/local/www/system_advanced_notifications.php
index 1905a51..6b8b121 100644
--- a/usr/local/www/system_advanced_notifications.php
+++ b/usr/local/www/system_advanced_notifications.php
@@ -46,6 +46,17 @@ if($config['notifications']['growl']['password'])
if($config['notifications']['growl']['ipaddress'])
$pconfig['ipaddress'] = $config['notifications']['growl']['ipaddress'];
+if($config['notifications']['growl']['notification_name'])
+ $pconfig['notification_name'] = $config['notifications']['growl']['notification_name'];
+else
+ $pconfig['notification_name'] = 'pfSense growl alert';
+
+if($config['notifications']['growl']['name'])
+ $pconfig['name'] = $config['notifications']['growl']['name'];
+else
+ $pconfig['name'] = 'PHP-Growl';
+
+
// SMTP
if($config['notifications']['smtp']['ipaddress'])
$pconfig['smtpipaddress'] = $config['notifications']['smtp']['ipaddress'];
@@ -81,6 +92,8 @@ if ($_POST) {
// Growl
$config['notifications']['growl']['ipaddress'] = $_POST['ipaddress'];
$config['notifications']['growl']['password'] = $_POST['password'];
+ $config['notifications']['growl']['name'] = $_POST['name'];
+ $config['notifications']['growl']['notification_name'] = $_POST['notification_name'];
// SMTP
$config['notifications']['smtp']['ipaddress'] = $_POST['smtpipaddress'];
@@ -148,6 +161,20 @@ include("head.inc");
<td colspan="2" valign="top" class="listtopic">Growl</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell">Registration Name</td>
+ <td width="78%" class="vtable">
+ <input name='name' value='<?php echo $pconfig['name']; ?>'><br/>
+ Enter the name to register with the Growl server (default: PHP-Growl).
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell">Notification Name</td>
+ <td width="78%" class="vtable">
+ <input name='notification_name' value='<?php echo $pconfig['notification_name']; ?>'><br/>
+ Enter a name for the Growl notifications (default: pfSense growl alert).
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell">IP Address</td>
<td width="78%" class="vtable">
<input name='ipaddress' value='<?php echo $pconfig['ipaddress']; ?>'><br/>
OpenPOWER on IntegriCloud