Fix: Properly send notifications again

Fixes #630
This commit is contained in:
Sebastian Grewe 2013-08-23 11:28:07 +02:00
parent 1f6ccfd6be
commit e6cf43efa0

View File

@ -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);
?>