mirror of
https://github.com/itflow-org/itflow
synced 2026-12-02 00:59:03 +00:00
Mail review stage 5: a website form's email is answered at the visitor in its Reply-To, who becomes the ticket's CC under the client whose domain the site is on or none, and Reply-To at the sender's own domain is taken as the sender; someone who isn't a contact is answered without their subject or the ticket's link, and a forged ticket or one with no contact no longer emails the client's colleagues; a client's reply on a ticket nobody is assigned goes to the new-ticket address or the admins, and bounce and closed-ticket notices go to the assigned agent or the admins instead of every agent; an email with no From is from nobody rather than itflow-guest@example.com; a forged email no longer clears Email bounced; an address that is a contact at two clients goes to the one whose domain it is or where they last raised a ticket, with a note; an agent's emailed reply that went to the client is their public reply and the first response; 26.12.3 changelog
This commit is contained in:
@@ -80,6 +80,26 @@ function appNotify($type, $details, $action = null, $client_id = 0, $entity_id =
|
||||
}
|
||||
}
|
||||
|
||||
/* appNotify() for the agents $user_ids only - $details SQL-escaped, as there. How many were told. */
|
||||
function appNotifyUsers(array $user_ids, $type, $details, $action = '', $client_id = 0, $entity_id = 0) {
|
||||
global $mysqli;
|
||||
|
||||
$type = logSqlText($type, 200);
|
||||
$details = logSqlText($details, 1000);
|
||||
$action = logSqlText((string) $action, 250);
|
||||
$client_id = intval($client_id);
|
||||
$entity_id = intval($entity_id);
|
||||
|
||||
$told = 0;
|
||||
foreach (array_unique(array_map('intval', $user_ids)) as $user_id) {
|
||||
if ($user_id > 0) {
|
||||
mysqli_query($mysqli, "INSERT INTO notifications SET notification_type = '$type', notification = '$details', notification_action = '$action', notification_client_id = $client_id, notification_entity_id = $entity_id, notification_user_id = $user_id");
|
||||
$told++;
|
||||
}
|
||||
}
|
||||
return $told;
|
||||
}
|
||||
|
||||
function logAudit($type, $action, $description, $client_id = 0, $entity_id = 0) {
|
||||
global $mysqli, $session_user_agent, $session_ip, $session_user_id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user