Commit 96691170 authored by skummer's avatar skummer

ZP-351 #comment set owner as authenticated user when a task has no owner yet #time 45m

git-svn-id: https://z-push.org/svn/z-push/trunk@1673 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent b3ccb89e
......@@ -397,6 +397,7 @@ class MAPIMapping {
"completion" => "PT_DOUBLE:PSETID_Task:0x8102",
"status" => "PT_LONG:PSETID_Task:0x8101",
"icon" => PR_ICON_INDEX,
"owner" => "PT_STRING8:PSETID_Task:0x811F",
);
}
......
......@@ -1486,7 +1486,22 @@ class MAPIProvider {
$recur["duedate"] = $task->duedate;
$recurrence->setRecurrence($recur);
}
//open addresss book for user resolve to set the owner
$addrbook = $this->getAddressbook();
// check if there is already an owner for the task, set current user if not
$p = array( $taskprops["owner"]);
$owner = $this->getProps($mapimessage, $p);
if (!isset($owner[$taskprops["owner"]])) {
$userinfo = mapi_zarafa_getuser($this->store, Request::GetAuthUser());
if(mapi_last_hresult() == NOERROR && isset($userinfo["fullname"])) {
$props[$taskprops["owner"]] = $userinfo["fullname"];
}
}
mapi_setprops($mapimessage, $props);
}
/**
......
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