Commit e1004315 authored by skummer's avatar skummer

ZP-112

- merged r35009 r35029] from Zarafa trunk

git-svn-id: https://z-push.org/svn/z-push/trunk@1316 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 418ffac7
......@@ -1158,12 +1158,24 @@
foreach($recipientRows as $key => $recipient) {
$found = false;
foreach($exception_recips as $excep_recip) {
if ($recipient[PR_ENTRYID] == $excep_recip[PR_ENTRYID])
if ($recipient[PR_SEARCH_KEY] == $excep_recip[PR_SEARCH_KEY])
$found = true;
}
if (!$found) {
if (empty($deletedRecipients)) {
$foundInDeletedRecipients = false;
// Look if the $recipient is in the list of deleted recipients
if (!empty($deletedRecipients)) {
foreach($deletedRecipients as $recip) {
if ($recip[PR_SEARCH_KEY] == $recipient[PR_SEARCH_KEY]){
$foundInDeletedRecipients = true;
break;
}
}
}
// If recipient is not in list of deleted recipient, add him
if (!$foundInDeletedRecipients) {
if (!isset($recipient[PR_RECIPIENT_FLAGS]) || $recipient[PR_RECIPIENT_FLAGS] != (recipReserved | recipExceptionalDeleted | recipSendable)) {
$recipient[PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalDeleted;
} else {
......@@ -1172,18 +1184,6 @@
$recipient[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone; // No Response required
$deletedRecipients[] = $recipient;
}
foreach($deletedRecipients as $recip) {
if ($recip[PR_ENTRYID] != $recipient[PR_ENTRYID]){
if (!isset($recipient[PR_RECIPIENT_FLAGS]) || $recipient[PR_RECIPIENT_FLAGS] != (recipReserved | recipExceptionalDeleted | recipSendable)) {
$recipient[PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalDeleted;
} else {
$recipient[PR_RECIPIENT_FLAGS] = recipReserved | recipExceptionalDeleted | recipSendable;
}
$recipient[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone; // No Response required
$deletedRecipients[] = $recipient;
}
}
}
// When $message contains a non-empty recipienttable, we must delete the recipients
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment