mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 02:12:17 +00:00
- jobs/MailJob->sendAllMessageEmailNotices changed since parameter default value
- Moved ALT_OE from MessageLib to CL/Messages_model - MessageLib->_setSentError renamed to _updatedRecipientNoticeEmailInfo - MessageLib->_sendNoticeEmail changed to have more information about a not sent notice email - Recipient_model->getNotSentMessages now does not retrieve messages with notice email send failure
This commit is contained in:
@@ -26,6 +26,8 @@ class Messages_model extends CI_Model
|
||||
const TYPE_PERSONS = 'persons';
|
||||
const TYPE_PRESTUDENTS = 'prestudents';
|
||||
|
||||
const ALT_OE = 'infocenter'; // alternative organisation unit when no one is found for a presetudent
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -106,7 +108,7 @@ class Messages_model extends CI_Model
|
||||
{
|
||||
$ouOptions .= sprintf(
|
||||
"\n".'<option value="%s">%s</option>',
|
||||
is_numeric($ou->prestudent_id) ? $ou->oe_kurzbz : MessageLib::ALT_OE,
|
||||
is_numeric($ou->prestudent_id) ? $ou->oe_kurzbz : self::ALT_OE,
|
||||
$ou->bezeichnung . (is_numeric($ou->prestudent_id) ? '' : ' *')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -205,12 +205,13 @@ class Recipient_model extends DB_Model
|
||||
* @param limit specifies the max number of messages to get
|
||||
* @param since specifies from which date messages have to be retrieved
|
||||
*/
|
||||
public function getNotSentMessages($limit, $since = '1970-01-01')
|
||||
public function getNotSentMessages($limit, $since)
|
||||
{
|
||||
$query = 'SELECT mm.message_id
|
||||
FROM public.tbl_msg_recipient mr
|
||||
JOIN public.tbl_msg_message mm USING (message_id)
|
||||
WHERE mr.sent IS NULL
|
||||
AND mr.sentinfo IS NULL
|
||||
AND mm.insertamum > ?
|
||||
ORDER BY mr.insertamum ASC
|
||||
LIMIT ?';
|
||||
|
||||
Reference in New Issue
Block a user