mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
- Added new template for plain text email
- Renamed template for html email mail.php -> mailHTML.php - Changed method getMessageByToken of Recipient_model for getting only the last message by token - Changed method getMessages of Recipient_model for getting event the token - Changed method send of library MailLib to add the possibility to send an alternative plain text body for a html mail - Changed library MessageLib to add the possibility to send emails in html/text format to inform the users about new messages - Added method toHTML to controller Messages - Added new configuration entries in message.php - Added new view messageHTML.php
This commit is contained in:
@@ -68,8 +68,8 @@ class Recipient_model extends DB_Model
|
||||
return $this->_error(lang("fhc_".FHC_NORIGHT)." -> ".$this->getBerechtigungKurzbz("public.tbl_msg_status"), FHC_MODEL_ERROR);
|
||||
|
||||
$sql = "SELECT r.message_id,
|
||||
r.person_id as receiver_id,
|
||||
m.person_id as sender_id,
|
||||
r.person_id as receiver_id,
|
||||
m.subject,
|
||||
m.body,
|
||||
m.insertamum,
|
||||
@@ -80,13 +80,12 @@ class Recipient_model extends DB_Model
|
||||
s.insertamum as statusamum
|
||||
FROM public.tbl_msg_recipient r JOIN public.tbl_msg_message m USING (message_id)
|
||||
JOIN (
|
||||
SELECT * FROM public.tbl_msg_status ORDER BY insertamum DESC LIMIT 1
|
||||
SELECT * FROM public.tbl_msg_status WHERE status < ? ORDER BY insertamum DESC, status DESC
|
||||
) s ON (r.message_id = s.message_id AND r.person_id = s.person_id)
|
||||
WHERE r.token = ?
|
||||
AND status < ?
|
||||
ORDER BY s.insertamum DESC";
|
||||
LIMIT 1";
|
||||
|
||||
$result = $this->db->query($sql, array($token, MSG_STATUS_DELETED));
|
||||
$result = $this->db->query($sql, array(MSG_STATUS_DELETED, $token));
|
||||
if (is_object($result))
|
||||
return $this->_success($result->result());
|
||||
else
|
||||
@@ -236,6 +235,7 @@ class Recipient_model extends DB_Model
|
||||
ks.kontakt as sender,
|
||||
kr.kontakt as receiver,
|
||||
mr.person_id as receiver_id,
|
||||
mr.token,
|
||||
mm.subject,
|
||||
mm.body,
|
||||
mr.sentinfo
|
||||
|
||||
Reference in New Issue
Block a user