Add smarty dependency on NotificationService

This commit is contained in:
Liquidsoul 2019-04-17 16:49:03 +02:00
parent 4f7e858ed3
commit 29e599983e
No known key found for this signature in database
GPG Key ID: 15983D72D696931D
4 changed files with 6 additions and 4 deletions

View File

@ -43,7 +43,7 @@ $logService = new LogService();
$pollService = new PollService($connect, $logService); $pollService = new PollService($connect, $logService);
$inputService = new InputService(); $inputService = new InputService();
$mailService = new MailService($config['use_smtp'], $config['smtp_options'], $config['use_sendmail']); $mailService = new MailService($config['use_smtp'], $config['smtp_options'], $config['use_sendmail']);
$notificationService = new NotificationService($mailService); $notificationService = new NotificationService($mailService, $smarty);
$securityService = new SecurityService(); $securityService = new SecurityService();
/* PAGE */ /* PAGE */

View File

@ -51,7 +51,7 @@ $pollService = new PollService($connect, $logService);
$adminPollService = new AdminPollService($connect, $pollService, $logService); $adminPollService = new AdminPollService($connect, $pollService, $logService);
$inputService = new InputService(); $inputService = new InputService();
$mailService = new MailService($config['use_smtp'], $config['smtp_options'], $config['use_sendmail']); $mailService = new MailService($config['use_smtp'], $config['smtp_options'], $config['use_sendmail']);
$notificationService = new NotificationService($mailService); $notificationService = new NotificationService($mailService, $smarty);
$sessionService = new SessionService(); $sessionService = new SessionService();
/* PAGE */ /* PAGE */

View File

@ -15,9 +15,11 @@ class NotificationService {
const DELETED_POLL = 11; const DELETED_POLL = 11;
private $mailService; private $mailService;
private $smarty;
function __construct(MailService $mailService) { function __construct(MailService $mailService, \Smarty $smarty) {
$this->mailService = $mailService; $this->mailService = $mailService;
$this->smarty = $smarty;
} }
/** /**

View File

@ -59,7 +59,7 @@ $logService = new LogService();
$pollService = new PollService($connect, $logService); $pollService = new PollService($connect, $logService);
$inputService = new InputService(); $inputService = new InputService();
$mailService = new MailService($config['use_smtp'], $config['smtp_options'], $config['use_sendmail']); $mailService = new MailService($config['use_smtp'], $config['smtp_options'], $config['use_sendmail']);
$notificationService = new NotificationService($mailService); $notificationService = new NotificationService($mailService, $smarty);
$securityService = new SecurityService(); $securityService = new SecurityService();
$sessionService = new SessionService(); $sessionService = new SessionService();