Commit f40391d1 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #642 in ZP/z-push from feature/ZP-1340-review-stream-writes to develop

* commit '60e99add':
  ZP-1340 Add transaction flag to stream writes.
parents 4752d428 60e99add
...@@ -304,7 +304,7 @@ ...@@ -304,7 +304,7 @@
if (!empty($msgbody) && strrpos($msgbody, $separator) === false) { if (!empty($msgbody) && strrpos($msgbody, $separator) === false) {
$msgbody = $separator . $msgbody; $msgbody = $separator . $msgbody;
$stream = mapi_openproperty($this->message, PR_BODY, IID_IStream, 0, 0); $stream = mapi_openproperty($this->message, PR_BODY, IID_IStream, STGM_TRANSACTED, 0);
mapi_stream_setsize($stream, strlen($msgbody)); mapi_stream_setsize($stream, strlen($msgbody));
mapi_stream_write($stream, $msgbody); mapi_stream_write($stream, $msgbody);
mapi_stream_commit($stream); mapi_stream_commit($stream);
......
...@@ -910,7 +910,7 @@ ...@@ -910,7 +910,7 @@
// edit response before sending task response. // edit response before sending task response.
if ($this->taskCommentsInfo) { if ($this->taskCommentsInfo) {
$comments = $this->getTaskCommentsInfo(); $comments = $this->getTaskCommentsInfo();
$stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY); $stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, STGM_TRANSACTED, MAPI_CREATE | MAPI_MODIFY);
mapi_stream_setsize($stream, strlen($comments)); mapi_stream_setsize($stream, strlen($comments));
mapi_stream_write($stream, $comments); mapi_stream_write($stream, $comments);
mapi_stream_commit($stream); mapi_stream_commit($stream);
......
...@@ -658,3 +658,21 @@ define('RSF_ELID_ENTRYID' ,0x0001); // variable Indicates ...@@ -658,3 +658,21 @@ define('RSF_ELID_ENTRYID' ,0x0001); // variable Indicates
// that is of the type indicated by the value of the PersistID field of the PersistData structure. // that is of the type indicated by the value of the PersistID field of the PersistData structure.
define('RSF_ELID_HEADER' ,0x0002); // 4 bytes Indicates that the ElementData field contains a 4-byte header value equal to 0x00000000. define('RSF_ELID_HEADER' ,0x0002); // 4 bytes Indicates that the ElementData field contains a 4-byte header value equal to 0x00000000.
define('STGM_DIRECT' ,0x00000000);
define('STGM_TRANSACTED' ,0x00010000);
define('STGM_SIMPLE' ,0x08000000);
define('STGM_READ' ,0x00000000);
define('STGM_WRITE' ,0x00000001);
define('STGM_READWRITE' ,0x00000002);
define('STGM_SHARE_DENY_NONE' ,0x00000040);
define('STGM_SHARE_DENY_READ' ,0x00000030);
define('STGM_SHARE_DENY_WRITE' ,0x00000020);
define('STGM_SHARE_EXCLUSIVE' ,0x00000010);
define('STGM_PRIORITY' ,0x00040000);
define('STGM_DELETEONRELEASE' ,0x04000000);
define('STGM_NOSCRATCH' ,0x00100000);
define('STGM_CREATE' ,0x00001000);
define('STGM_CONVERT' ,0x00020000);
define('STGM_FAILIFTHERE' ,0x00000000);
define('STGM_NOSNAPSHOT' ,0x00200000);
define('STGM_DIRECT_SWMR' ,0x00400000);
\ No newline at end of file
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