Commit 657e2548 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #60 in ZP/z-push from...

Merge pull request #60 in ZP/z-push from bugfix/ZP-717-set-you-answered-this-message-on-date to develop

* commit '92031424':
  ZP-717 Don't use $props as it is used before.
  ZP-717 Set PR_LAST_VERB_EXECUTED and PR_LAST_VERB_EXECUTION_TIME correctly when replying/forwarding an email.
parents 70fb5336 92031424
...@@ -509,10 +509,25 @@ class BackendZarafa implements IBackend, ISearchProvider { ...@@ -509,10 +509,25 @@ class BackendZarafa implements IBackend, ISearchProvider {
if(!isset($fwmessage) || !$fwmessage) if(!isset($fwmessage) || !$fwmessage)
throw new StatusException(sprintf("ZarafaBackend->SendMail(): Could not open message id '%s' in folder id '%s' to be replied/forwarded: 0x%X", $sm->source->itemid, $sm->source->folderid, mapi_last_hresult()), SYNC_COMMONSTATUS_ITEMNOTFOUND); throw new StatusException(sprintf("ZarafaBackend->SendMail(): Could not open message id '%s' in folder id '%s' to be replied/forwarded: 0x%X", $sm->source->itemid, $sm->source->folderid, mapi_last_hresult()), SYNC_COMMONSTATUS_ITEMNOTFOUND);
//update icon when forwarding or replying message // update icon and last_verb when forwarding or replying message
if ($sm->forwardflag) mapi_setprops($fwmessage, array(PR_ICON_INDEX=>262)); // reply-all (verb 103) is not supported, as we cannot really detect this case
elseif ($sm->replyflag) mapi_setprops($fwmessage, array(PR_ICON_INDEX=>261)); if ($sm->forwardflag) {
$updateProps = array(
PR_ICON_INDEX => 262,
PR_LAST_VERB_EXECUTED => 104,
);
}
elseif ($sm->replyflag) {
$updateProps = array(
PR_ICON_INDEX => 261,
PR_LAST_VERB_EXECUTED => 102,
);
}
if (isset($updateProps)) {
$updateProps[PR_LAST_VERB_EXECUTION_TIME] = time();
mapi_setprops($fwmessage, $updateProps);
mapi_savechanges($fwmessage); mapi_savechanges($fwmessage);
}
// only attach the original message if the mobile does not send it itself // only attach the original message if the mobile does not send it itself
if (!isset($sm->replacemime)) { if (!isset($sm->replacemime)) {
......
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