Commit Graph

4 Commits

Author SHA1 Message Date
thnilsen
ea582aeed6 Fix bug notifications not being sent.
The code to handle sending of notification was missing. This change
makes two different options available on how notifications will be
handled which will be controlled by CRON_SERVER_IP config option.

 - If CRON_SERVER_IP is set, the server with the given IP should
   call URL ../admin/?task=cron every x minutes. If the config
   is left empty, the notification will be called once the
   incident has  been saved. (The latter meothod might cause
   server timeout if there are large numbers of subscribers!)

Other minor changes:

 - Removed old commented code

 - Removed call to syslog used for debugging
2020-08-15 21:09:57 +02:00
thnilsen
62e6f08e4f Code cleanup as suggested by the codacy service.
- Renamed get_service_details to populate_impacted_services
- Removed unused variables
2018-12-07 22:46:16 +01:00
Thomas Nilsen
c08264f4f7 Minor code cleanup suggested by codacy service 2018-11-25 21:33:18 +01:00
Thomas Nilsen
82e3dcb11e Add new classes
This implements the following new classes

- mailer.php Class to handle smtp/mail related tasks. This implements
  support for PHPMailer()

- notification.php Class to handle notification to subscribers.

- subscriber.php Class to handle the self-managment of subscribers.

- subscriptions.php Class to handle subscription to services for
  subscribers.
2018-11-25 17:18:09 +01:00