- Added new config entry in mail config file called enable_debug

- If enable_debug is true then info about the mail are logged into the CI error logs
- Fixed queries to get sent and received messages with Recipient_model, now messages for which a notice email was not sent are retrieved and messages are sorted by insertamum
- CL/Messages_model:
	- Before setting a message as read check if a record is already present
	- If the recipient is a prestudent then in table tbl_msg_message oe_kurzbz is set with the ou of the prestudent
	- The sender id (person_id) now is get from the currently logged user also when replying
- MessageLib->_sendNoticeEmails checks that the message was sent only from FAS (NOT from infocenter)
This commit is contained in:
Paolo
2020-02-18 15:19:58 +01:00
parent b94aad14fb
commit 0db611ed27
5 changed files with 100 additions and 43 deletions
+4 -3
View File
@@ -575,8 +575,9 @@ class MessageLib
// Use the degree program email
if (hasData($studiengangResult)) $message->receiverContact = getData($studiengangResult)[0]->email;
}
// If message was sent from FAS
elseif (!isEmptyString($message->sender_ou))
// If message was sent from FAS and NOT from infocenter
elseif (!isEmptyString($message->sender_ou)
&& !array_search($message->sender_ou, $this->_ci->config->item(self::CFG_OU_RECEIVERS_NO_NOTICE)))
{
// If the recipient organisation unit is NOT in the list of organisation units that sent only to private emails
if (array_search($message->receiver_ou, $this->_ci->config->item(self::CFG_OU_RECEIVERS_PRIVATE)) === false)
@@ -592,7 +593,7 @@ class MessageLib
}
// Otherwise try with the private email
if ($message->receiverContact == null)
if (isEmptyString($message->receiverContact))
{
$privateEmailResult = $this->_getPrivateEmail($message->receiver_id);
if (isError($privateEmailResult)) return $privateEmailResult; // if an error occured then return it