Commit 98d20fec authored by Ad Schellevis's avatar Ad Schellevis

refactor notices to keep the model more together

parent dc987699
...@@ -30,6 +30,10 @@ ...@@ -30,6 +30,10 @@
require_once("globals.inc"); require_once("globals.inc");
require_once("led.inc"); require_once("led.inc");
require_once("util.inc");
require_once("notices.growl.class");
require_once("notices.sasl.inc");
require_once("notices.smtp.inc");
/****f* notices/file_notice /****f* notices/file_notice
* NAME * NAME
...@@ -115,7 +119,6 @@ function get_notices($category = 'all') ...@@ -115,7 +119,6 @@ function get_notices($category = 'all')
******/ ******/
function close_notice($id) function close_notice($id)
{ {
require_once("util.inc");
/* soekris */ /* soekris */
if(file_exists("/dev/led/error")) if(file_exists("/dev/led/error"))
...@@ -243,8 +246,6 @@ function notify_via_smtp($message, $force = false) { ...@@ -243,8 +246,6 @@ function notify_via_smtp($message, $force = false) {
function send_smtp_message($message, $subject = "(no subject)") { function send_smtp_message($message, $subject = "(no subject)") {
global $config, $g; global $config, $g;
require_once("sasl.inc");
require_once("smtp.inc");
if(!$config['notifications']['smtp']['ipaddress']) if(!$config['notifications']['smtp']['ipaddress'])
return; return;
...@@ -303,7 +304,6 @@ function send_smtp_message($message, $subject = "(no subject)") { ...@@ -303,7 +304,6 @@ function send_smtp_message($message, $subject = "(no subject)") {
* returns true if message was sent * returns true if message was sent
******/ ******/
function notify_via_growl($message, $force=false) { function notify_via_growl($message, $force=false) {
require_once("growl.class");
global $config,$g; global $config,$g;
if (isset($config['notifications']['growl']['disable']) && !$force) if (isset($config['notifications']['growl']['disable']) && !$force)
...@@ -342,7 +342,6 @@ function notify_via_growl($message, $force=false) { ...@@ -342,7 +342,6 @@ function notify_via_growl($message, $force=false) {
* none * none
******/ ******/
function register_via_growl() { function register_via_growl() {
require_once("growl.class");
global $config; global $config;
$growl_ip = $config['notifications']['growl']['ipaddress']; $growl_ip = $config['notifications']['growl']['ipaddress'];
$growl_password = $config['notifications']['growl']['password']; $growl_password = $config['notifications']['growl']['password'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment