From 2ce66fe6007bbb91286cbbb3dfd08017d8a1415a Mon Sep 17 00:00:00 2001 From: bshuttle Date: Fri, 10 Feb 2006 09:58:09 +0000 Subject: [PATCH] KTS-341: workflow notifications don't respect email preferences. --- lib/dashboard/Notification.inc.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/dashboard/Notification.inc.php b/lib/dashboard/Notification.inc.php index 48406a0..2fe0ebe 100644 --- a/lib/dashboard/Notification.inc.php +++ b/lib/dashboard/Notification.inc.php @@ -341,7 +341,18 @@ class KTWorkflowNotification extends KTNotificationHandler { $aInfo['iUserId'] = $oUser->getId(); $aInfo['sLabel'] = $oDocument->getName(); - return KTNotification::createFromArray($aInfo); + $oNotification = KTNotification::createFromArray($aInfo); + + $handler = new KTWorkflowNotification(); + + if ($oUser->getEmailNotification() && (strlen($oUser->getEmail()) > 0)) { + $emailContent = $handler->handleNotification($oNotification); + $emailSubject = sprintf(_('Workflow Notification: %s'), $oDocument->getName()); + $oEmail = new EmailAlert($oUser->getEmail(), $emailSubject, $emailContent); + $oEmail->send(); + } + + return $oNotification; } function handleNotification($oKTNotification) { -- libgit2 0.21.4