From a45259377b182b0daa4094caae2500c6a1fe4000 Mon Sep 17 00:00:00 2001 From: laf Date: Tue, 19 Jan 2016 21:50:00 +0000 Subject: [PATCH] Added local rss file + tidied up locations of notifications and callback --- daily.php | 4 ++-- callback.php => includes/callback.php | 0 includes/defaults.inc.php | 1 + notifications.php => includes/notifications.php | 4 ++-- misc/notifications.rss | 16 ++++++++++++++++ 5 files changed, 21 insertions(+), 4 deletions(-) rename callback.php => includes/callback.php (100%) rename notifications.php => includes/notifications.php (96%) create mode 100644 misc/notifications.rss diff --git a/daily.php b/daily.php index 4bad15d72b..b6d82fc8a2 100644 --- a/daily.php +++ b/daily.php @@ -101,7 +101,7 @@ if ($options['f'] === 'perf_times') { } if ($options['f'] === 'callback') { - include_once 'callback.php'; + include_once 'includes/callback.php'; } if ($options['f'] === 'device_perf') { @@ -113,7 +113,7 @@ if ($options['f'] === 'device_perf') { } if ($options['f'] === 'notifications') { - include_once 'notifications.php'; + include_once 'includes/notifications.php'; } if ($options['f'] === 'purgeusers') { diff --git a/callback.php b/includes/callback.php similarity index 100% rename from callback.php rename to includes/callback.php diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index 2e9282b35b..b64026ef14 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -847,6 +847,7 @@ $config['availability-map-width'] = 25; // Default notifications Feed $config['notifications']['LibreNMS'] = 'http://www.librenms.org/notifications.rss'; +$config['notifications']['local'] = 'misc/notifications.rss'; // Update channel (Can be 'master' or 'release') $config['update_channel'] = 'master'; diff --git a/notifications.php b/includes/notifications.php similarity index 96% rename from notifications.php rename to includes/notifications.php index 7c3acb8ea2..313dcabd5e 100644 --- a/notifications.php +++ b/includes/notifications.php @@ -22,8 +22,8 @@ * @subpackage Notifications */ -require_once 'includes/defaults.inc.php'; -require_once 'config.php'; +require_once $config['install_dir'].'/includes/defaults.inc.php'; +require_once $config['install_dir'].'/config.php'; require_once $config['install_dir'].'/includes/definitions.inc.php'; require_once $config['install_dir'].'/includes/functions.php'; diff --git a/misc/notifications.rss b/misc/notifications.rss new file mode 100644 index 0000000000..f4baa96ca4 --- /dev/null +++ b/misc/notifications.rss @@ -0,0 +1,16 @@ + + + + LibreNMS Notifications + RSS feed for notifications to LibreNMS users + http://www.librenms.org/ + Tue, 19 Jan 2016 12:00:00 +0000 + Tue, 19 Jan 2016 12:00:00 +0000 + 1800 + + Hello World! + This is the first notification. We will post these whenever an upcoming major change is about to happen. + Tue, 19 Jan 2016 12:00:00 +0000 + + +