- Added element email_send_immediately in configuration array in mail.php

- Renamed sendOne to sendEmail
- Added new method sendOne
- Added $message_id parameter to method getMessages of model Recipient_model
This commit is contained in:
bison
2016-08-24 13:38:47 +02:00
parent 011dbb980f
commit d6664e74c5
3 changed files with 137 additions and 6 deletions
@@ -21,8 +21,9 @@ class Recipient_model extends DB_Model
* @param kontaktType specifies the type of the kontakt to get
* @param sent specifies the status of the messages to get (NULL never sent, otherwise the shipping date)
* @param limit specifies the number of messages to get
* @param message_id specifies a single message
*/
public function getMessages($kontaktType, $sent, $limit = null)
public function getMessages($kontaktType, $sent, $limit = null, $message_id = null)
{
// Check rights
if (! $this->fhc_db_acl->isBerechtigt($this->getBerechtigungKurzbz("public.tbl_msg_recipient"), "s"))
@@ -59,6 +60,12 @@ class Recipient_model extends DB_Model
$query .= " WHERE mr.sent = ?";
}
if (!is_null($message_id))
{
array_push($parametersArray, $message_id);
$query .= " AND mm.message_id = ?";
}
$query .= " ORDER BY mr.insertamum ASC";
if (!is_null($limit))