From: <sy...@us...> - 2004-03-24 17:33:31
|
Update of /cvsroot/tikiwiki/tiki/lib/articles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11221/lib/articles Modified Files: artlib.php Log Message: messages mail in user charset and user language and correct uf8 header Index: artlib.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/lib/articles/artlib.php,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- artlib.php 10 Jan 2004 04:41:24 -0000 1.31 +++ artlib.php 24 Mar 2004 17:22:52 -0000 1.32 @@ -184,10 +184,10 @@ $query = "select max(`subId`) from `tiki_submissions` where `created` = ? and `title`=? and `hash`=?"; $id = $this->getOne($query,array((int) $now,$title,$hash)); $emails = $notificationlib->get_mail_events('article_submitted', '*'); - $foo = parse_url($_SERVER["REQUEST_URI"]); - $machine = httpPrefix(). $foo["path"]; - - foreach ($emails as $email) { + if (count($emails)) { + include_once("lib/notifications/notificationemaillib.php"); + $foo = parse_url($_SERVER["REQUEST_URI"]); + $machine = httpPrefix(). $foo["path"]; $smarty->assign('mail_site', $_SERVER["SERVER_NAME"]); $smarty->assign('mail_user', $user); @@ -197,9 +197,7 @@ $smarty->assign('mail_date', date("U")); $smarty->assign('mail_machine', $machine); $smarty->assign('mail_subId', $id); - $mail_data = $smarty->fetch('mail/submission_notification.tpl'); - @mail($email, tra('New article submitted at '). $_SERVER["SERVER_NAME"], $mail_data, - "From: $sender_email\r\nContent-type: text/plain;charset=utf-8\r\n"); + sendEmailNotification($emails, "email", "submission_notification_subject.tpl", $_SERVER["SERVER_NAME"], "submission_notification.tpl"); } return $id; |