From e6cf43efa0f027fb9875368adad57e2daf7cebdb Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Fri, 23 Aug 2013 11:28:07 +0200 Subject: [PATCH] Fix: Properly send notifications again Fixes #630 --- public/include/classes/notification.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/include/classes/notification.class.php b/public/include/classes/notification.class.php index 08f3d3f5..ac61d105 100644 --- a/public/include/classes/notification.class.php +++ b/public/include/classes/notification.class.php @@ -164,9 +164,13 @@ class Notification extends Mail { if ($stmt && $stmt->bind_param('si', $strType, $account_id) && $stmt->execute() && $stmt->bind_result($id) && $stmt->fetch()) { if ($stmt->close() && $this->sendMail('notifications/' . $strType, $aMailData) && $this->addNotification($account_id, $strType, $aMailData)) { return true; + } else { + $this->setErrorMessage('SendMail call failed: ' . $this->mail->getError()); + return false; } } else { $this->setErrorMessage('User disabled ' . $strType . ' notifications'); + return false; } $this->setErrorMessage('Error sending mail notification'); return false; @@ -178,5 +182,5 @@ $notification->setDebug($debug); $notification->setMysql($mysqli); $notification->setSmarty($smarty); $notification->setConfig($config); - +$notification->setSetting($setting); ?>