@@ -43,7 +43,7 @@ |
||
43 | 43 | // assign display message |
44 | 44 | $this->displayMessage = $displayMessage; |
45 | 45 | |
46 | - parent::__construct($errorMessage, (int) $code, $previous); |
|
46 | + parent::__construct($errorMessage, (int)$code, $previous); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | $attachments = mapi_table_queryallrows($attachmentTable, [PR_ATTACH_NUM, PR_ATTACH_SIZE, PR_ATTACH_LONG_FILENAME, PR_ATTACHMENT_HIDDEN, PR_DISPLAY_NAME, PR_ATTACH_METHOD]); |
283 | 283 | |
284 | 284 | foreach ($attachments as $attach_props) { |
285 | - $attach_old = mapi_message_openattach($this->message, (int) $attach_props[PR_ATTACH_NUM]); |
|
285 | + $attach_old = mapi_message_openattach($this->message, (int)$attach_props[PR_ATTACH_NUM]); |
|
286 | 286 | $attach_newResourceMsg = mapi_message_createattach($newMessage); |
287 | 287 | |
288 | 288 | mapi_copyto($attach_old, [], [], $attach_newResourceMsg, 0); |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | |
301 | 301 | if (!empty($msgbody) && strrpos($msgbody, $separator) === false) { |
302 | 302 | $msgbody = $separator . $msgbody; |
303 | - $stream = mapi_openproperty($this->message, PR_BODY, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY); |
|
303 | + $stream = mapi_openproperty($this->message, PR_BODY, IID_IStream, 0, MAPI_CREATE|MAPI_MODIFY); |
|
304 | 304 | mapi_stream_setsize($stream, strlen($msgbody)); |
305 | 305 | mapi_stream_write($stream, $msgbody); |
306 | 306 | mapi_stream_commit($stream); |
@@ -574,8 +574,8 @@ discard block |
||
574 | 574 | } |
575 | 575 | |
576 | 576 | // get timings of the first occurrence |
577 | - $firstoccstartdate = isset($startocc) ? $start + (((int) $startocc) * 60) : $start; |
|
578 | - $firstoccenddate = isset($endocc) ? $end + (((int) $endocc) * 60) : $end; |
|
577 | + $firstoccstartdate = isset($startocc) ? $start + (((int)$startocc) * 60) : $start; |
|
578 | + $firstoccenddate = isset($endocc) ? $end + (((int)$endocc) * 60) : $end; |
|
579 | 579 | |
580 | 580 | $start = gmdate(dgettext("kopano", "d-m-Y"), $firstoccstartdate); |
581 | 581 | $end = gmdate(dgettext("kopano", "d-m-Y"), $firstoccenddate); |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | $props[PR_EXCEPTION_ENDTIME] = $this->fromGMT($this->tz, $exception_props[$this->proptags["duedate"]]); |
726 | 726 | mapi_setprops($attachment, $props); |
727 | 727 | |
728 | - $imessage = mapi_attach_openobj($attachment, MAPI_CREATE | MAPI_MODIFY); |
|
728 | + $imessage = mapi_attach_openobj($attachment, MAPI_CREATE|MAPI_MODIFY); |
|
729 | 729 | |
730 | 730 | if ($copy_attach_from) { |
731 | 731 | $attachmentTable = mapi_message_getattachmenttable($copy_attach_from); |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | $attachments = mapi_table_queryallrows($attachmentTable, [PR_ATTACH_NUM, PR_ATTACH_SIZE, PR_ATTACH_LONG_FILENAME, PR_ATTACHMENT_HIDDEN, PR_DISPLAY_NAME, PR_ATTACH_METHOD]); |
734 | 734 | |
735 | 735 | foreach ($attachments as $attach_props) { |
736 | - $attach_old = mapi_message_openattach($copy_attach_from, (int) $attach_props[PR_ATTACH_NUM]); |
|
736 | + $attach_old = mapi_message_openattach($copy_attach_from, (int)$attach_props[PR_ATTACH_NUM]); |
|
737 | 737 | $attach_newResourceMsg = mapi_message_createattach($imessage); |
738 | 738 | mapi_copyto($attach_old, [], [], $attach_newResourceMsg, 0); |
739 | 739 | mapi_savechanges($attach_newResourceMsg); |
@@ -1089,13 +1089,13 @@ discard block |
||
1089 | 1089 | // Remove all deleted recipients |
1090 | 1090 | if (isset($exception_recips['remove'])) { |
1091 | 1091 | foreach ($exception_recips['remove'] as &$recip) { |
1092 | - if (!isset($recipient[PR_RECIPIENT_FLAGS]) || $recip[PR_RECIPIENT_FLAGS] != (recipReserved | recipExceptionalDeleted | recipSendable)) { |
|
1093 | - $recip[PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalDeleted; |
|
1092 | + if (!isset($recipient[PR_RECIPIENT_FLAGS]) || $recip[PR_RECIPIENT_FLAGS] != (recipReserved|recipExceptionalDeleted|recipSendable)) { |
|
1093 | + $recip[PR_RECIPIENT_FLAGS] = recipSendable|recipExceptionalDeleted; |
|
1094 | 1094 | } |
1095 | 1095 | else { |
1096 | - $recip[PR_RECIPIENT_FLAGS] = recipReserved | recipExceptionalDeleted | recipSendable; |
|
1096 | + $recip[PR_RECIPIENT_FLAGS] = recipReserved|recipExceptionalDeleted|recipSendable; |
|
1097 | 1097 | } |
1098 | - $recip[PR_RECIPIENT_TRACKSTATUS] = olResponseNone; // No Response required |
|
1098 | + $recip[PR_RECIPIENT_TRACKSTATUS] = olResponseNone; // No Response required |
|
1099 | 1099 | } |
1100 | 1100 | unset($recip); |
1101 | 1101 | mapi_message_modifyrecipients($exception, MODRECIP_MODIFY, $exception_recips['remove']); |
@@ -1165,13 +1165,13 @@ discard block |
||
1165 | 1165 | |
1166 | 1166 | // If recipient is not in list of deleted recipient, add him |
1167 | 1167 | if (!$foundInDeletedRecipients) { |
1168 | - if (!isset($recipient[PR_RECIPIENT_FLAGS]) || $recipient[PR_RECIPIENT_FLAGS] != (recipReserved | recipExceptionalDeleted | recipSendable)) { |
|
1169 | - $recipient[PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalDeleted; |
|
1168 | + if (!isset($recipient[PR_RECIPIENT_FLAGS]) || $recipient[PR_RECIPIENT_FLAGS] != (recipReserved|recipExceptionalDeleted|recipSendable)) { |
|
1169 | + $recipient[PR_RECIPIENT_FLAGS] = recipSendable|recipExceptionalDeleted; |
|
1170 | 1170 | } |
1171 | 1171 | else { |
1172 | - $recipient[PR_RECIPIENT_FLAGS] = recipReserved | recipExceptionalDeleted | recipSendable; |
|
1172 | + $recipient[PR_RECIPIENT_FLAGS] = recipReserved|recipExceptionalDeleted|recipSendable; |
|
1173 | 1173 | } |
1174 | - $recipient[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone; // No Response required |
|
1174 | + $recipient[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone; // No Response required |
|
1175 | 1175 | $deletedRecipients[] = $recipient; |
1176 | 1176 | } |
1177 | 1177 | } |
@@ -1230,12 +1230,12 @@ discard block |
||
1230 | 1230 | $hasOrganizer = false; |
1231 | 1231 | // Check if meeting already has an organizer. |
1232 | 1232 | foreach ($recipients as $key => $recipient) { |
1233 | - if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable | recipOrganizer)) { |
|
1233 | + if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable|recipOrganizer)) { |
|
1234 | 1234 | $hasOrganizer = true; |
1235 | 1235 | } |
1236 | 1236 | elseif ($isException && !isset($recipient[PR_RECIPIENT_FLAGS])) { |
1237 | 1237 | // Recipients for an occurrence |
1238 | - $recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalResponse; |
|
1238 | + $recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable|recipExceptionalResponse; |
|
1239 | 1239 | } |
1240 | 1240 | } |
1241 | 1241 | |
@@ -1249,7 +1249,7 @@ discard block |
||
1249 | 1249 | $organizer[PR_RECIPIENT_DISPLAY_NAME] = $messageProps[PR_SENT_REPRESENTING_NAME]; |
1250 | 1250 | $organizer[PR_ADDRTYPE] = empty($messageProps[PR_SENT_REPRESENTING_ADDRTYPE]) ? 'SMTP' : $messageProps[PR_SENT_REPRESENTING_ADDRTYPE]; |
1251 | 1251 | $organizer[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone; |
1252 | - $organizer[PR_RECIPIENT_FLAGS] = recipSendable | recipOrganizer; |
|
1252 | + $organizer[PR_RECIPIENT_FLAGS] = recipSendable|recipOrganizer; |
|
1253 | 1253 | $organizer[PR_SEARCH_KEY] = $messageProps[PR_SENT_REPRESENTING_SEARCH_KEY]; |
1254 | 1254 | |
1255 | 1255 | // Add organizer to recipients list. |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * we have to manually typecast value to integer, so float will be converted in integer, |
53 | 53 | * but still its out of bound for integer limit so it will be auto adjusted to minus value |
54 | 54 | */ |
55 | - if ($errcode != (int) $value) { |
|
55 | + if ($errcode != (int)$value) { |
|
56 | 56 | continue; |
57 | 57 | } |
58 | 58 | // Check that we have an actual MAPI error or warning definition |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * @param mixed $value |
168 | 168 | */ |
169 | 169 | function DTE_IS_REMOTE_VALID($value) { |
170 | - return (bool) ($value & DTE_FLAG_REMOTE_VALID); |
|
170 | + return (bool)($value & DTE_FLAG_REMOTE_VALID); |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | /** |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | * @param mixed $value |
177 | 177 | */ |
178 | 178 | function DTE_IS_ACL_CAPABLE($value) { |
179 | - return (bool) ($value & DTE_FLAG_ACL_CAPABLE); |
|
179 | + return (bool)($value & DTE_FLAG_ACL_CAPABLE); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | function DTE_REMOTE($value) { |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | // OR |
224 | 224 | [RES_OR, |
225 | 225 | [ |
226 | - [RES_AND, // Normal items: itemEnd must be after viewStart, itemStart must be before viewEnd |
|
226 | + [RES_AND, // Normal items: itemEnd must be after viewStart, itemStart must be before viewEnd |
|
227 | 227 | [ |
228 | 228 | [RES_PROPERTY, |
229 | 229 | [RELOP => RELOP_GT, |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | ], |
248 | 248 | ], |
249 | 249 | ], // EXISTS OR |
250 | - ]; // global OR |
|
250 | + ]; // global OR |
|
251 | 251 | |
252 | 252 | // Get requested properties, plus whatever we need |
253 | 253 | $proplist = [PR_ENTRYID, $properties["recurring"], $properties["recurring_data"], $properties["timezone_data"]]; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @param mixed $code |
28 | 28 | */ |
29 | 29 | function make_mapi_e($code) { |
30 | - return (int) mapi_make_scode(1, $code); |
|
30 | + return (int)mapi_make_scode(1, $code); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @param mixed $code |
37 | 37 | */ |
38 | 38 | function make_mapi_s($code) { |
39 | - return (int) mapi_make_scode(0, $code); |
|
39 | + return (int)mapi_make_scode(0, $code); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /* From mapicode.h */ |
@@ -16,40 +16,40 @@ discard block |
||
16 | 16 | |
17 | 17 | /* Object type */ |
18 | 18 | |
19 | -define('MAPI_STORE', 0x00000001); /* Message Store */ |
|
20 | -define('MAPI_ADDRBOOK', 0x00000002); /* Address Book */ |
|
21 | -define('MAPI_FOLDER', 0x00000003); /* Folder */ |
|
22 | -define('MAPI_ABCONT', 0x00000004); /* Address Book Container */ |
|
23 | -define('MAPI_MESSAGE', 0x00000005); /* Message */ |
|
24 | -define('MAPI_MAILUSER', 0x00000006); /* Individual Recipient */ |
|
25 | -define('MAPI_ATTACH', 0x00000007); /* Attachment */ |
|
26 | -define('MAPI_DISTLIST', 0x00000008); /* Distribution List Recipient */ |
|
27 | -define('MAPI_PROFSECT', 0x00000009); /* Profile Section */ |
|
28 | -define('MAPI_STATUS', 0x0000000A); /* Status Object */ |
|
29 | -define('MAPI_SESSION', 0x0000000B); /* Session */ |
|
30 | -define('MAPI_FORMINFO', 0x0000000C); /* Form Information */ |
|
19 | +define('MAPI_STORE', 0x00000001); /* Message Store */ |
|
20 | +define('MAPI_ADDRBOOK', 0x00000002); /* Address Book */ |
|
21 | +define('MAPI_FOLDER', 0x00000003); /* Folder */ |
|
22 | +define('MAPI_ABCONT', 0x00000004); /* Address Book Container */ |
|
23 | +define('MAPI_MESSAGE', 0x00000005); /* Message */ |
|
24 | +define('MAPI_MAILUSER', 0x00000006); /* Individual Recipient */ |
|
25 | +define('MAPI_ATTACH', 0x00000007); /* Attachment */ |
|
26 | +define('MAPI_DISTLIST', 0x00000008); /* Distribution List Recipient */ |
|
27 | +define('MAPI_PROFSECT', 0x00000009); /* Profile Section */ |
|
28 | +define('MAPI_STATUS', 0x0000000A); /* Status Object */ |
|
29 | +define('MAPI_SESSION', 0x0000000B); /* Session */ |
|
30 | +define('MAPI_FORMINFO', 0x0000000C); /* Form Information */ |
|
31 | 31 | |
32 | 32 | define('MV_FLAG', 0x1000); |
33 | 33 | define('MV_INSTANCE', 0x2000); |
34 | -define('MVI_FLAG', MV_FLAG | MV_INSTANCE); |
|
35 | - |
|
36 | -define('PT_UNSPECIFIED', 0); /* (Reserved for interface use) type doesn't matter to caller */ |
|
37 | -define('PT_NULL', 1); /* NULL property value */ |
|
38 | -define('PT_I2', 2); /* Signed 16-bit value */ |
|
39 | -define('PT_LONG', 3); /* Signed 32-bit value */ |
|
40 | -define('PT_R4', 4); /* 4-byte floating point */ |
|
41 | -define('PT_DOUBLE', 5); /* Floating point double */ |
|
42 | -define('PT_CURRENCY', 6); /* Signed 64-bit int (decimal w/ 4 digits right of decimal pt) */ |
|
43 | -define('PT_APPTIME', 7); /* Application time */ |
|
44 | -define('PT_ERROR', 10); /* 32-bit error value */ |
|
45 | -define('PT_BOOLEAN', 11); /* 16-bit boolean (non-zero true) */ |
|
46 | -define('PT_OBJECT', 13); /* Embedded object in a property */ |
|
47 | -define('PT_I8', 20); /* 8-byte signed integer */ |
|
48 | -define('PT_STRING8', 30); /* Null terminated 8-bit character string */ |
|
49 | -define('PT_UNICODE', 31); /* Null terminated Unicode string */ |
|
50 | -define('PT_SYSTIME', 64); /* FILETIME 64-bit int w/ number of 100ns periods since Jan 1,1601 */ |
|
51 | -define('PT_CLSID', 72); /* OLE GUID */ |
|
52 | -define('PT_BINARY', 258); /* Uninterpreted (counted byte array) */ |
|
34 | +define('MVI_FLAG', MV_FLAG|MV_INSTANCE); |
|
35 | + |
|
36 | +define('PT_UNSPECIFIED', 0); /* (Reserved for interface use) type doesn't matter to caller */ |
|
37 | +define('PT_NULL', 1); /* NULL property value */ |
|
38 | +define('PT_I2', 2); /* Signed 16-bit value */ |
|
39 | +define('PT_LONG', 3); /* Signed 32-bit value */ |
|
40 | +define('PT_R4', 4); /* 4-byte floating point */ |
|
41 | +define('PT_DOUBLE', 5); /* Floating point double */ |
|
42 | +define('PT_CURRENCY', 6); /* Signed 64-bit int (decimal w/ 4 digits right of decimal pt) */ |
|
43 | +define('PT_APPTIME', 7); /* Application time */ |
|
44 | +define('PT_ERROR', 10); /* 32-bit error value */ |
|
45 | +define('PT_BOOLEAN', 11); /* 16-bit boolean (non-zero true) */ |
|
46 | +define('PT_OBJECT', 13); /* Embedded object in a property */ |
|
47 | +define('PT_I8', 20); /* 8-byte signed integer */ |
|
48 | +define('PT_STRING8', 30); /* Null terminated 8-bit character string */ |
|
49 | +define('PT_UNICODE', 31); /* Null terminated Unicode string */ |
|
50 | +define('PT_SYSTIME', 64); /* FILETIME 64-bit int w/ number of 100ns periods since Jan 1,1601 */ |
|
51 | +define('PT_CLSID', 72); /* OLE GUID */ |
|
52 | +define('PT_BINARY', 258); /* Uninterpreted (counted byte array) */ |
|
53 | 53 | /* Changes are likely to these numbers, and to their structures. */ |
54 | 54 | |
55 | 55 | /* Alternate property type names for ease of use */ |
@@ -61,18 +61,18 @@ discard block |
||
61 | 61 | |
62 | 62 | define('PT_TSTRING', PT_STRING8); |
63 | 63 | |
64 | -define('PT_MV_I2', (MV_FLAG | PT_I2)); |
|
65 | -define('PT_MV_LONG', (MV_FLAG | PT_LONG)); |
|
66 | -define('PT_MV_R4', (MV_FLAG | PT_R4)); |
|
67 | -define('PT_MV_DOUBLE', (MV_FLAG | PT_DOUBLE)); |
|
68 | -define('PT_MV_CURRENCY', (MV_FLAG | PT_CURRENCY)); |
|
69 | -define('PT_MV_APPTIME', (MV_FLAG | PT_APPTIME)); |
|
70 | -define('PT_MV_SYSTIME', (MV_FLAG | PT_SYSTIME)); |
|
71 | -define('PT_MV_STRING8', (MV_FLAG | PT_STRING8)); |
|
72 | -define('PT_MV_BINARY', (MV_FLAG | PT_BINARY)); |
|
73 | -define('PT_MV_UNICODE', (MV_FLAG | PT_UNICODE)); |
|
74 | -define('PT_MV_CLSID', (MV_FLAG | PT_CLSID)); |
|
75 | -define('PT_MV_I8', (MV_FLAG | PT_I8)); |
|
64 | +define('PT_MV_I2', (MV_FLAG|PT_I2)); |
|
65 | +define('PT_MV_LONG', (MV_FLAG|PT_LONG)); |
|
66 | +define('PT_MV_R4', (MV_FLAG|PT_R4)); |
|
67 | +define('PT_MV_DOUBLE', (MV_FLAG|PT_DOUBLE)); |
|
68 | +define('PT_MV_CURRENCY', (MV_FLAG|PT_CURRENCY)); |
|
69 | +define('PT_MV_APPTIME', (MV_FLAG|PT_APPTIME)); |
|
70 | +define('PT_MV_SYSTIME', (MV_FLAG|PT_SYSTIME)); |
|
71 | +define('PT_MV_STRING8', (MV_FLAG|PT_STRING8)); |
|
72 | +define('PT_MV_BINARY', (MV_FLAG|PT_BINARY)); |
|
73 | +define('PT_MV_UNICODE', (MV_FLAG|PT_UNICODE)); |
|
74 | +define('PT_MV_CLSID', (MV_FLAG|PT_CLSID)); |
|
75 | +define('PT_MV_I8', (MV_FLAG|PT_I8)); |
|
76 | 76 | |
77 | 77 | define('PT_MV_TSTRING', PT_MV_STRING8); |
78 | 78 | /* bit 0: set if descending, clear if ascending */ |
@@ -190,14 +190,14 @@ discard block |
||
190 | 190 | |
191 | 191 | /* Values for PR_RESOURCE_TYPE, _METHODS, _FLAGS */ |
192 | 192 | |
193 | -define('MAPI_STORE_PROVIDER', 33); /* Message Store */ |
|
194 | -define('MAPI_AB', 34); /* Address Book */ |
|
195 | -define('MAPI_AB_PROVIDER', 35); /* Address Book Provider */ |
|
196 | -define('MAPI_TRANSPORT_PROVIDER', 36); /* Transport Provider */ |
|
197 | -define('MAPI_SPOOLER', 37); /* Message Spooler */ |
|
198 | -define('MAPI_PROFILE_PROVIDER', 38); /* Profile Provider */ |
|
199 | -define('MAPI_SUBSYSTEM', 39); /* Overall Subsystem Status */ |
|
200 | -define('MAPI_HOOK_PROVIDER', 40); /* Spooler Hook */ |
|
193 | +define('MAPI_STORE_PROVIDER', 33); /* Message Store */ |
|
194 | +define('MAPI_AB', 34); /* Address Book */ |
|
195 | +define('MAPI_AB_PROVIDER', 35); /* Address Book Provider */ |
|
196 | +define('MAPI_TRANSPORT_PROVIDER', 36); /* Transport Provider */ |
|
197 | +define('MAPI_SPOOLER', 37); /* Message Spooler */ |
|
198 | +define('MAPI_PROFILE_PROVIDER', 38); /* Profile Provider */ |
|
199 | +define('MAPI_SUBSYSTEM', 39); /* Overall Subsystem Status */ |
|
200 | +define('MAPI_HOOK_PROVIDER', 40); /* Spooler Hook */ |
|
201 | 201 | define('STATUS_VALIDATE_STATE', 0x00000001); |
202 | 202 | define('STATUS_SETTINGS_DIALOG', 0x00000002); |
203 | 203 | define('STATUS_CHANGE_PASSWORD', 0x00000004); |
@@ -243,10 +243,10 @@ discard block |
||
243 | 243 | define('MODRECIP_MODIFY', 0x00000004); |
244 | 244 | define('MODRECIP_REMOVE', 0x00000008); |
245 | 245 | |
246 | -define('MAPI_ORIG', 0); /* Recipient is message originator */ |
|
247 | -define('MAPI_TO', 1); /* Recipient is a primary recipient */ |
|
248 | -define('MAPI_CC', 2); /* Recipient is a copy recipient */ |
|
249 | -define('MAPI_BCC', 3); /* Recipient is blind copy recipient */ |
|
246 | +define('MAPI_ORIG', 0); /* Recipient is message originator */ |
|
247 | +define('MAPI_TO', 1); /* Recipient is a primary recipient */ |
|
248 | +define('MAPI_CC', 2); /* Recipient is a copy recipient */ |
|
249 | +define('MAPI_BCC', 3); /* Recipient is blind copy recipient */ |
|
250 | 250 | |
251 | 251 | /* IAttach Interface ------------------------------------------------------- */ |
252 | 252 | |
@@ -438,28 +438,28 @@ discard block |
||
438 | 438 | define('BMR_NEZ', 0x00000001); |
439 | 439 | |
440 | 440 | /* array index values of restrictions -- same values are used in php-ext/main.cpp::PHPArraytoSRestriction() */ |
441 | -define('VALUE', 0); // propval |
|
442 | -define('RELOP', 1); // compare method |
|
443 | -define('FUZZYLEVEL', 2); // string search flags |
|
444 | -define('CB', 3); // size restriction |
|
445 | -define('ULTYPE', 4); // bit mask restriction type BMR_xxx |
|
446 | -define('ULMASK', 5); // bitmask |
|
447 | -define('ULPROPTAG', 6); // property |
|
448 | -define('ULPROPTAG1', 7); // RES_COMPAREPROPS 1st property |
|
449 | -define('ULPROPTAG2', 8); // RES_COMPAREPROPS 2nd property |
|
450 | -define('PROPS', 9); // RES_COMMENT properties |
|
451 | -define('RESTRICTION', 10); // RES_COMMENT and RES_SUBRESTRICTION restriction |
|
441 | +define('VALUE', 0); // propval |
|
442 | +define('RELOP', 1); // compare method |
|
443 | +define('FUZZYLEVEL', 2); // string search flags |
|
444 | +define('CB', 3); // size restriction |
|
445 | +define('ULTYPE', 4); // bit mask restriction type BMR_xxx |
|
446 | +define('ULMASK', 5); // bitmask |
|
447 | +define('ULPROPTAG', 6); // property |
|
448 | +define('ULPROPTAG1', 7); // RES_COMPAREPROPS 1st property |
|
449 | +define('ULPROPTAG2', 8); // RES_COMPAREPROPS 2nd property |
|
450 | +define('PROPS', 9); // RES_COMMENT properties |
|
451 | +define('RESTRICTION', 10); // RES_COMMENT and RES_SUBRESTRICTION restriction |
|
452 | 452 | |
453 | 453 | /* GUIDs for PR_MDB_PROVIDER */ |
454 | -define("KOPANO_SERVICE_GUID", makeGuid("{3C253DCA-D227-443C-94FE-425FAB958C19}")); // default store |
|
455 | -define("KOPANO_STORE_PUBLIC_GUID", makeGuid("{D47F4A09-D3BD-493C-B2FC-3C90BBCB48D4}")); // public store |
|
456 | -define("KOPANO_STORE_DELEGATE_GUID", makeGuid("{7C7C1085-BC6D-4E53-9DAB-8A53F8DEF808}")); // other store |
|
457 | -define("KOPANO_STORE_ARCHIVER_GUID", makeGuid("{BC8953AD-2E3F-4172-9404-896FF459870F}")); // archive store |
|
454 | +define("KOPANO_SERVICE_GUID", makeGuid("{3C253DCA-D227-443C-94FE-425FAB958C19}")); // default store |
|
455 | +define("KOPANO_STORE_PUBLIC_GUID", makeGuid("{D47F4A09-D3BD-493C-B2FC-3C90BBCB48D4}")); // public store |
|
456 | +define("KOPANO_STORE_DELEGATE_GUID", makeGuid("{7C7C1085-BC6D-4E53-9DAB-8A53F8DEF808}")); // other store |
|
457 | +define("KOPANO_STORE_ARCHIVER_GUID", makeGuid("{BC8953AD-2E3F-4172-9404-896FF459870F}")); // archive store |
|
458 | 458 | /* webapp depends on these yet */ |
459 | -define("ZARAFA_SERVICE_GUID", makeGuid("{3C253DCA-D227-443C-94FE-425FAB958C19}")); // default store |
|
460 | -define("ZARAFA_STORE_PUBLIC_GUID", makeGuid("{D47F4A09-D3BD-493C-B2FC-3C90BBCB48D4}")); // public store |
|
461 | -define("ZARAFA_STORE_DELEGATE_GUID", makeGuid("{7C7C1085-BC6D-4E53-9DAB-8A53F8DEF808}")); // other store |
|
462 | -define('ZARAFA_STORE_ARCHIVER_GUID', makeGuid("{BC8953AD-2E3F-4172-9404-896FF459870F}")); // archive store |
|
459 | +define("ZARAFA_SERVICE_GUID", makeGuid("{3C253DCA-D227-443C-94FE-425FAB958C19}")); // default store |
|
460 | +define("ZARAFA_STORE_PUBLIC_GUID", makeGuid("{D47F4A09-D3BD-493C-B2FC-3C90BBCB48D4}")); // public store |
|
461 | +define("ZARAFA_STORE_DELEGATE_GUID", makeGuid("{7C7C1085-BC6D-4E53-9DAB-8A53F8DEF808}")); // other store |
|
462 | +define('ZARAFA_STORE_ARCHIVER_GUID', makeGuid("{BC8953AD-2E3F-4172-9404-896FF459870F}")); // archive store |
|
463 | 463 | |
464 | 464 | /* global profile section guid */ |
465 | 465 | define('pbGlobalProfileSectionGuid', makeGuid("{C8B0DB13-05AA-1A10-9BB0-00AA002FC45A}")); |
@@ -487,10 +487,10 @@ discard block |
||
487 | 487 | // define('ecrightsContact' ,0x00000200); |
488 | 488 | define('ecRightsFolderVisible', 0x00000400); |
489 | 489 | |
490 | -define('ecRightsAll', ecRightsReadAny | ecRightsCreate | ecRightsEditOwned | ecRightsDeleteOwned | ecRightsEditAny | ecRightsDeleteAny | ecRightsCreateSubfolder | ecRightsFolderAccess | ecRightsFolderVisible); |
|
491 | -define('ecRightsFullControl', ecRightsReadAny | ecRightsCreate | ecRightsEditOwned | ecRightsDeleteOwned | ecRightsEditAny | ecRightsDeleteAny | ecRightsCreateSubfolder | ecRightsFolderVisible); |
|
492 | -define('ecRightsDefault', ecRightsNone | ecRightsFolderVisible); |
|
493 | -define('ecRightsDefaultPublic', ecRightsReadAny | ecRightsFolderVisible); |
|
490 | +define('ecRightsAll', ecRightsReadAny|ecRightsCreate|ecRightsEditOwned|ecRightsDeleteOwned|ecRightsEditAny|ecRightsDeleteAny|ecRightsCreateSubfolder|ecRightsFolderAccess|ecRightsFolderVisible); |
|
491 | +define('ecRightsFullControl', ecRightsReadAny|ecRightsCreate|ecRightsEditOwned|ecRightsDeleteOwned|ecRightsEditAny|ecRightsDeleteAny|ecRightsCreateSubfolder|ecRightsFolderVisible); |
|
492 | +define('ecRightsDefault', ecRightsNone|ecRightsFolderVisible); |
|
493 | +define('ecRightsDefaultPublic', ecRightsReadAny|ecRightsFolderVisible); |
|
494 | 494 | define('ecRightsAdmin', 0x00001000); |
495 | 495 | define('ecRightsAllMask', 0x000015FB); |
496 | 496 | |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | define('ROW_ADD', 0x0001); |
507 | 507 | define('ROW_MODIFY', 0x0002); |
508 | 508 | define('ROW_REMOVE', 0x0004); |
509 | -define('ROW_EMPTY', (ROW_ADD | ROW_REMOVE)); |
|
509 | +define('ROW_EMPTY', (ROW_ADD|ROW_REMOVE)); |
|
510 | 510 | |
511 | 511 | // new property types |
512 | 512 | define('PT_SRESTRICTION', 0x00FD); |
@@ -576,11 +576,11 @@ discard block |
||
576 | 576 | define('SYNC_NO_FOREIGN_KEYS', 0x100); |
577 | 577 | define('SYNC_LIMITED_IMESSAGE', 0x200); |
578 | 578 | define('SYNC_CATCHUP', 0x400); |
579 | -define('SYNC_NEW_MESSAGE', 0x800); // only applicable to ImportMessageChange() |
|
580 | -define('SYNC_MSG_SELECTIVE', 0x1000); // Used internally. Will reject if used by clients. |
|
579 | +define('SYNC_NEW_MESSAGE', 0x800); // only applicable to ImportMessageChange() |
|
580 | +define('SYNC_MSG_SELECTIVE', 0x1000); // Used internally. Will reject if used by clients. |
|
581 | 581 | define('SYNC_BEST_BODY', 0x2000); |
582 | 582 | define('SYNC_IGNORE_SPECIFIED_ON_ASSOCIATED', 0x4000); |
583 | -define('SYNC_PROGRESS_MODE', 0x8000); // AirMapi progress mode |
|
583 | +define('SYNC_PROGRESS_MODE', 0x8000); // AirMapi progress mode |
|
584 | 584 | define('SYNC_FXRECOVERMODE', 0x10000); |
585 | 585 | define('SYNC_DEFER_CONFIG', 0x20000); |
586 | 586 | define('SYNC_FORCE_UNICODE', 0x40000); // Forces server to return Unicode properties |
@@ -591,23 +591,23 @@ discard block |
||
591 | 591 | define('TBL_BATCH', 0x00000002); // Batch multiple table commands |
592 | 592 | |
593 | 593 | /* Flags for recipients in exceptions */ |
594 | -define('recipSendable', 0x00000001); // sendable attendee. |
|
595 | -define('recipOrganizer', 0x00000002); // meeting organizer |
|
596 | -define('recipExceptionalResponse', 0x00000010); // attendee gave a response for the exception |
|
597 | -define('recipExceptionalDeleted', 0x00000020); // recipientRow exists, but it is treated as if the corresponding recipient is deleted from meeting |
|
598 | -define('recipOriginal', 0x00000100); // recipient is an original Attendee |
|
594 | +define('recipSendable', 0x00000001); // sendable attendee. |
|
595 | +define('recipOrganizer', 0x00000002); // meeting organizer |
|
596 | +define('recipExceptionalResponse', 0x00000010); // attendee gave a response for the exception |
|
597 | +define('recipExceptionalDeleted', 0x00000020); // recipientRow exists, but it is treated as if the corresponding recipient is deleted from meeting |
|
598 | +define('recipOriginal', 0x00000100); // recipient is an original Attendee |
|
599 | 599 | define('recipReserved', 0x00000200); |
600 | 600 | |
601 | 601 | /* Flags which indicates type of Meeting Object */ |
602 | -define('mtgEmpty', 0x00000000); // Unspecified. |
|
603 | -define('mtgRequest', 0x00000001); // Initial meeting request. |
|
604 | -define('mtgFull', 0x00010000); // Full update. |
|
605 | -define('mtgInfo', 0x00020000); // Informational update. |
|
606 | -define('mtgOutOfDate', 0x00080000); // A newer Meeting Request object or Meeting Update object was received after this one. |
|
607 | -define('mtgDelegatorCopy', 0x00100000); // This is set on the delegator's copy when a delegate will handle meeting-related objects. |
|
608 | - |
|
609 | -define('MAPI_ONE_OFF_UNICODE', 0x8000); // the flag that defines whether the embedded strings are Unicode in one off entryids. |
|
610 | -define('MAPI_ONE_OFF_NO_RICH_INFO', 0x0001); // the flag that specifies whether the recipient gets TNEF or not. |
|
602 | +define('mtgEmpty', 0x00000000); // Unspecified. |
|
603 | +define('mtgRequest', 0x00000001); // Initial meeting request. |
|
604 | +define('mtgFull', 0x00010000); // Full update. |
|
605 | +define('mtgInfo', 0x00020000); // Informational update. |
|
606 | +define('mtgOutOfDate', 0x00080000); // A newer Meeting Request object or Meeting Update object was received after this one. |
|
607 | +define('mtgDelegatorCopy', 0x00100000); // This is set on the delegator's copy when a delegate will handle meeting-related objects. |
|
608 | + |
|
609 | +define('MAPI_ONE_OFF_UNICODE', 0x8000); // the flag that defines whether the embedded strings are Unicode in one off entryids. |
|
610 | +define('MAPI_ONE_OFF_NO_RICH_INFO', 0x0001); // the flag that specifies whether the recipient gets TNEF or not. |
|
611 | 611 | |
612 | 612 | /* Mask flags for mapi_msgstore_advise */ |
613 | 613 | define('fnevCriticalError', 0x00000001); |
@@ -25,37 +25,37 @@ |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | switch ($this->getCode()) { |
28 | - case MAPI_E_NO_ACCESS: |
|
29 | - return dgettext("kopano", "You have insufficient privileges to open this object."); |
|
28 | + case MAPI_E_NO_ACCESS: |
|
29 | + return dgettext("kopano", "You have insufficient privileges to open this object."); |
|
30 | 30 | |
31 | - case MAPI_E_LOGON_FAILED: |
|
32 | - case MAPI_E_UNCONFIGURED: |
|
33 | - return dgettext("kopano", "Logon Failed. Please check your username/password."); |
|
31 | + case MAPI_E_LOGON_FAILED: |
|
32 | + case MAPI_E_UNCONFIGURED: |
|
33 | + return dgettext("kopano", "Logon Failed. Please check your username/password."); |
|
34 | 34 | |
35 | - case MAPI_E_NETWORK_ERROR: |
|
36 | - return dgettext("kopano", "Can not connect to Kopano server."); |
|
35 | + case MAPI_E_NETWORK_ERROR: |
|
36 | + return dgettext("kopano", "Can not connect to Kopano server."); |
|
37 | 37 | |
38 | - case MAPI_E_UNKNOWN_ENTRYID: |
|
39 | - return dgettext("kopano", "Can not open object with provided id."); |
|
38 | + case MAPI_E_UNKNOWN_ENTRYID: |
|
39 | + return dgettext("kopano", "Can not open object with provided id."); |
|
40 | 40 | |
41 | - case MAPI_E_NO_RECIPIENTS: |
|
42 | - return dgettext("kopano", "There are no recipients in the message."); |
|
41 | + case MAPI_E_NO_RECIPIENTS: |
|
42 | + return dgettext("kopano", "There are no recipients in the message."); |
|
43 | 43 | |
44 | - case MAPI_E_NOT_FOUND: |
|
45 | - return dgettext("kopano", "Can not find object."); |
|
44 | + case MAPI_E_NOT_FOUND: |
|
45 | + return dgettext("kopano", "Can not find object."); |
|
46 | 46 | |
47 | - case MAPI_E_INTERFACE_NOT_SUPPORTED: |
|
48 | - case MAPI_E_INVALID_PARAMETER: |
|
49 | - case MAPI_E_INVALID_ENTRYID: |
|
50 | - case MAPI_E_INVALID_OBJECT: |
|
51 | - case MAPI_E_TOO_COMPLEX: |
|
52 | - case MAPI_E_CORRUPT_DATA: |
|
53 | - case MAPI_E_END_OF_SESSION: |
|
54 | - case MAPI_E_AMBIGUOUS_RECIP: |
|
55 | - case MAPI_E_COLLISION: |
|
56 | - case MAPI_E_UNCONFIGURED: |
|
57 | - default: |
|
58 | - return sprintf(dgettext("kopano", "Unknown MAPI Error: %s"), get_mapi_error_name($this->getCode())); |
|
47 | + case MAPI_E_INTERFACE_NOT_SUPPORTED: |
|
48 | + case MAPI_E_INVALID_PARAMETER: |
|
49 | + case MAPI_E_INVALID_ENTRYID: |
|
50 | + case MAPI_E_INVALID_OBJECT: |
|
51 | + case MAPI_E_TOO_COMPLEX: |
|
52 | + case MAPI_E_CORRUPT_DATA: |
|
53 | + case MAPI_E_END_OF_SESSION: |
|
54 | + case MAPI_E_AMBIGUOUS_RECIP: |
|
55 | + case MAPI_E_COLLISION: |
|
56 | + case MAPI_E_UNCONFIGURED: |
|
57 | + default: |
|
58 | + return sprintf(dgettext("kopano", "Unknown MAPI Error: %s"), get_mapi_error_name($this->getCode())); |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | } |
@@ -131,15 +131,15 @@ discard block |
||
131 | 131 | $properties["reminderminutes"] = "PT_LONG:PSETID_Common:0x8501"; |
132 | 132 | $properties["reminderset"] = "PT_BOOLEAN:PSETID_Common:0x8503"; |
133 | 133 | $properties["sendasical"] = "PT_BOOLEAN:PSETID_Appointment:0x8200"; |
134 | - $properties["updatecounter"] = "PT_LONG:PSETID_Appointment:0x8201"; // AppointmentSequenceNumber |
|
135 | - $properties["last_updatecounter"] = "PT_LONG:PSETID_Appointment:0x8203"; // AppointmentLastSequence |
|
134 | + $properties["updatecounter"] = "PT_LONG:PSETID_Appointment:0x8201"; // AppointmentSequenceNumber |
|
135 | + $properties["last_updatecounter"] = "PT_LONG:PSETID_Appointment:0x8203"; // AppointmentLastSequence |
|
136 | 136 | $properties["unknown7"] = "PT_LONG:PSETID_Appointment:0x8202"; |
137 | 137 | $properties["busystatus"] = "PT_LONG:PSETID_Appointment:0x8205"; |
138 | 138 | $properties["intendedbusystatus"] = "PT_LONG:PSETID_Appointment:0x8224"; |
139 | 139 | $properties["start"] = "PT_SYSTIME:PSETID_Appointment:0x820d"; |
140 | 140 | $properties["responselocation"] = "PT_STRING8:PSETID_Meeting:0x2"; |
141 | 141 | $properties["location"] = "PT_STRING8:PSETID_Appointment:0x8208"; |
142 | - $properties["requestsent"] = "PT_BOOLEAN:PSETID_Appointment:0x8229"; // PidLidFInvited, MeetingRequestWasSent |
|
142 | + $properties["requestsent"] = "PT_BOOLEAN:PSETID_Appointment:0x8229"; // PidLidFInvited, MeetingRequestWasSent |
|
143 | 143 | $properties["startdate"] = "PT_SYSTIME:PSETID_Appointment:0x820d"; |
144 | 144 | $properties["duedate"] = "PT_SYSTIME:PSETID_Appointment:0x820e"; |
145 | 145 | $properties["commonstart"] = "PT_SYSTIME:PSETID_Common:0x8516"; |
@@ -147,11 +147,11 @@ discard block |
||
147 | 147 | $properties["recurring"] = "PT_BOOLEAN:PSETID_Appointment:0x8223"; |
148 | 148 | $properties["clipstart"] = "PT_SYSTIME:PSETID_Appointment:0x8235"; |
149 | 149 | $properties["clipend"] = "PT_SYSTIME:PSETID_Appointment:0x8236"; |
150 | - $properties["start_recur_date"] = "PT_LONG:PSETID_Meeting:0xD"; // StartRecurTime |
|
151 | - $properties["start_recur_time"] = "PT_LONG:PSETID_Meeting:0xE"; // StartRecurTime |
|
152 | - $properties["end_recur_date"] = "PT_LONG:PSETID_Meeting:0xF"; // EndRecurDate |
|
153 | - $properties["end_recur_time"] = "PT_LONG:PSETID_Meeting:0x10"; // EndRecurTime |
|
154 | - $properties["is_exception"] = "PT_BOOLEAN:PSETID_Meeting:0xA"; // LID_IS_EXCEPTION |
|
150 | + $properties["start_recur_date"] = "PT_LONG:PSETID_Meeting:0xD"; // StartRecurTime |
|
151 | + $properties["start_recur_time"] = "PT_LONG:PSETID_Meeting:0xE"; // StartRecurTime |
|
152 | + $properties["end_recur_date"] = "PT_LONG:PSETID_Meeting:0xF"; // EndRecurDate |
|
153 | + $properties["end_recur_time"] = "PT_LONG:PSETID_Meeting:0x10"; // EndRecurTime |
|
154 | + $properties["is_exception"] = "PT_BOOLEAN:PSETID_Meeting:0xA"; // LID_IS_EXCEPTION |
|
155 | 155 | $properties["apptreplyname"] = "PT_STRING8:PSETID_Appointment:0x8230"; |
156 | 156 | // Propose new time properties |
157 | 157 | $properties["proposed_start_whole"] = "PT_SYSTIME:PSETID_Appointment:0x8250"; |
@@ -521,7 +521,7 @@ discard block |
||
521 | 521 | $messageprops = mapi_getprops($this->message, $listProperties); |
522 | 522 | $store = $this->store; |
523 | 523 | |
524 | - $goid = $messageprops[$this->proptags['goid']]; // GlobalID (0x3) |
|
524 | + $goid = $messageprops[$this->proptags['goid']]; // GlobalID (0x3) |
|
525 | 525 | if (!isset($goid)) { |
526 | 526 | return; |
527 | 527 | } |
@@ -1318,7 +1318,7 @@ discard block |
||
1318 | 1318 | $props[$this->proptags['goid2']] = $goid; |
1319 | 1319 | |
1320 | 1320 | if (!isset($props[$this->proptags['updatecounter']])) { |
1321 | - $props[$this->proptags['updatecounter']] = 0; // OL also starts sequence no with zero. |
|
1321 | + $props[$this->proptags['updatecounter']] = 0; // OL also starts sequence no with zero. |
|
1322 | 1322 | $props[$this->proptags['last_updatecounter']] = 0; |
1323 | 1323 | } |
1324 | 1324 | |
@@ -2031,12 +2031,12 @@ discard block |
||
2031 | 2031 | $hasOrganizer = false; |
2032 | 2032 | // Check if meeting already has an organizer. |
2033 | 2033 | foreach ($recipients as $key => $recipient) { |
2034 | - if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable | recipOrganizer)) { |
|
2034 | + if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable|recipOrganizer)) { |
|
2035 | 2035 | $hasOrganizer = true; |
2036 | 2036 | } |
2037 | 2037 | elseif ($isException && !isset($recipient[PR_RECIPIENT_FLAGS])) { |
2038 | 2038 | // Recipients for an occurrence |
2039 | - $recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalResponse; |
|
2039 | + $recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable|recipExceptionalResponse; |
|
2040 | 2040 | } |
2041 | 2041 | } |
2042 | 2042 | |
@@ -2050,7 +2050,7 @@ discard block |
||
2050 | 2050 | $organizer[PR_RECIPIENT_DISPLAY_NAME] = $messageProps[PR_SENT_REPRESENTING_NAME]; |
2051 | 2051 | $organizer[PR_ADDRTYPE] = empty($messageProps[PR_SENT_REPRESENTING_ADDRTYPE]) ? 'SMTP' : $messageProps[PR_SENT_REPRESENTING_ADDRTYPE]; |
2052 | 2052 | $organizer[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone; |
2053 | - $organizer[PR_RECIPIENT_FLAGS] = recipSendable | recipOrganizer; |
|
2053 | + $organizer[PR_RECIPIENT_FLAGS] = recipSendable|recipOrganizer; |
|
2054 | 2054 | $organizer[PR_SEARCH_KEY] = $messageProps[PR_SENT_REPRESENTING_SEARCH_KEY]; |
2055 | 2055 | |
2056 | 2056 | // Add organizer to recipients list. |
@@ -2166,7 +2166,7 @@ discard block |
||
2166 | 2166 | continue; |
2167 | 2167 | } |
2168 | 2168 | |
2169 | - $attach_old = mapi_message_openattach($copy_from, (int) $attach_props[PR_ATTACH_NUM]); |
|
2169 | + $attach_old = mapi_message_openattach($copy_from, (int)$attach_props[PR_ATTACH_NUM]); |
|
2170 | 2170 | $attach_newResourceMsg = mapi_message_createattach($copy_to); |
2171 | 2171 | mapi_copyto($attach_old, [], [], $attach_newResourceMsg, 0); |
2172 | 2172 | mapi_savechanges($attach_newResourceMsg); |
@@ -2249,7 +2249,7 @@ discard block |
||
2249 | 2249 | // Get resource recipients |
2250 | 2250 | $getResourcesRestriction = [RES_AND, |
2251 | 2251 | [[RES_PROPERTY, |
2252 | - [RELOP => RELOP_EQ, // Equals recipient type 3: Resource |
|
2252 | + [RELOP => RELOP_EQ, // Equals recipient type 3: Resource |
|
2253 | 2253 | ULPROPTAG => PR_RECIPIENT_TYPE, |
2254 | 2254 | VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC], |
2255 | 2255 | ], |
@@ -2508,7 +2508,7 @@ discard block |
||
2508 | 2508 | // Get resource recipients |
2509 | 2509 | $getResourcesRestriction = [RES_AND, |
2510 | 2510 | [[RES_PROPERTY, |
2511 | - [RELOP => RELOP_EQ, // Equals recipient type 3: Resource |
|
2511 | + [RELOP => RELOP_EQ, // Equals recipient type 3: Resource |
|
2512 | 2512 | ULPROPTAG => PR_RECIPIENT_TYPE, |
2513 | 2513 | VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC], |
2514 | 2514 | ], |
@@ -2682,7 +2682,7 @@ discard block |
||
2682 | 2682 | // In direct-booking mode, we don't need to send cancellations to resources |
2683 | 2683 | if ($this->enableDirectBooking) { |
2684 | 2684 | $restriction[1][] = [RES_PROPERTY, |
2685 | - [RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource) |
|
2685 | + [RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource) |
|
2686 | 2686 | ULPROPTAG => PR_RECIPIENT_TYPE, |
2687 | 2687 | VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC], |
2688 | 2688 | ], |
@@ -2767,7 +2767,7 @@ discard block |
||
2767 | 2767 | if ($this->enableDirectBooking) { |
2768 | 2768 | $stripResourcesRestriction[1][] = |
2769 | 2769 | [RES_PROPERTY, |
2770 | - [RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource) |
|
2770 | + [RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource) |
|
2771 | 2771 | ULPROPTAG => PR_RECIPIENT_TYPE, |
2772 | 2772 | VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC], |
2773 | 2773 | ], |
@@ -2840,7 +2840,7 @@ discard block |
||
2840 | 2840 | $newmessageprops[PR_MESSAGE_CLASS] = "IPM.Schedule.Meeting.Canceled"; |
2841 | 2841 | $newmessageprops[$this->proptags['meetingstatus']] = olMeetingCanceled; // It's a cancel request |
2842 | 2842 | $newmessageprops[$this->proptags['busystatus']] = fbFree; // set the busy status as free |
2843 | - $newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH; // HIGH Importance |
|
2843 | + $newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH; // HIGH Importance |
|
2844 | 2844 | if (isset($newmessageprops[PR_SUBJECT])) { |
2845 | 2845 | $newmessageprops[PR_SUBJECT] = dgettext("kopano", "Canceled") . ": " . $newmessageprops[PR_SUBJECT]; |
2846 | 2846 | } |
@@ -2896,12 +2896,12 @@ discard block |
||
2896 | 2896 | |
2897 | 2897 | // [0] => year, [1] => month, [2] => day, [3] => hour, [4] => minutes, [5] => seconds |
2898 | 2898 | // RecurStartDate = year * 512 + month_number * 32 + day_number |
2899 | - $newmessageprops[$this->proptags["start_recur_date"]] = (((int) $startDate[0]) * 512) + (((int) $startDate[1]) * 32) + ((int) $startDate[2]); |
|
2899 | + $newmessageprops[$this->proptags["start_recur_date"]] = (((int)$startDate[0]) * 512) + (((int)$startDate[1]) * 32) + ((int)$startDate[2]); |
|
2900 | 2900 | // RecurStartTime = hour * 4096 + minutes * 64 + seconds |
2901 | - $newmessageprops[$this->proptags["start_recur_time"]] = (((int) $startDate[3]) * 4096) + (((int) $startDate[4]) * 64) + ((int) $startDate[5]); |
|
2901 | + $newmessageprops[$this->proptags["start_recur_time"]] = (((int)$startDate[3]) * 4096) + (((int)$startDate[4]) * 64) + ((int)$startDate[5]); |
|
2902 | 2902 | |
2903 | - $newmessageprops[$this->proptags["end_recur_date"]] = (((int) $endDate[0]) * 512) + (((int) $endDate[1]) * 32) + ((int) $endDate[2]); |
|
2904 | - $newmessageprops[$this->proptags["end_recur_time"]] = (((int) $endDate[3]) * 4096) + (((int) $endDate[4]) * 64) + ((int) $endDate[5]); |
|
2903 | + $newmessageprops[$this->proptags["end_recur_date"]] = (((int)$endDate[0]) * 512) + (((int)$endDate[1]) * 32) + ((int)$endDate[2]); |
|
2904 | + $newmessageprops[$this->proptags["end_recur_time"]] = (((int)$endDate[3]) * 4096) + (((int)$endDate[4]) * 64) + ((int)$endDate[5]); |
|
2905 | 2905 | } |
2906 | 2906 | } |
2907 | 2907 |
@@ -22,12 +22,12 @@ discard block |
||
22 | 22 | * It is used to indicate the type of change that is being carried in the IPM.TaskRequest item (although this |
23 | 23 | * information seems redundant due to that information already being available in PR_MESSAGE_CLASS). |
24 | 24 | */ |
25 | - define('tdmtNothing', 0); // Value in IPM.Task items |
|
26 | - define('tdmtTaskReq', 1); // Assigner -> Assignee |
|
27 | - define('tdmtTaskAcc', 2); // Assignee -> Assigner |
|
28 | - define('tdmtTaskDec', 3); // Assignee -> Assigner |
|
29 | - define('tdmtTaskUpd', 4); // Assignee -> Assigner |
|
30 | - define('tdmtTaskSELF', 5); // Assigner -> Assigner (?) |
|
25 | + define('tdmtNothing', 0); // Value in IPM.Task items |
|
26 | + define('tdmtTaskReq', 1); // Assigner -> Assignee |
|
27 | + define('tdmtTaskAcc', 2); // Assignee -> Assigner |
|
28 | + define('tdmtTaskDec', 3); // Assignee -> Assigner |
|
29 | + define('tdmtTaskUpd', 4); // Assignee -> Assigner |
|
30 | + define('tdmtTaskSELF', 5); // Assigner -> Assigner (?) |
|
31 | 31 | |
32 | 32 | /* The TaskHistory is used to show the last action on the task on both the assigner and the assignee's side. |
33 | 33 | * |
@@ -35,20 +35,20 @@ discard block |
||
35 | 35 | * at the top of the task request in the format 'Accepted by <user> on 01-01-2010 11:00'. |
36 | 36 | */ |
37 | 37 | define('thNone', 0); |
38 | - define('thAccepted', 1); // Set by assignee |
|
39 | - define('thDeclined', 2); // Set by assignee |
|
40 | - define('thUpdated', 3); // Set by assignee |
|
38 | + define('thAccepted', 1); // Set by assignee |
|
39 | + define('thDeclined', 2); // Set by assignee |
|
40 | + define('thUpdated', 3); // Set by assignee |
|
41 | 41 | define('thDueDateChanged', 4); |
42 | - define('thAssigned', 5); // Set by assigner |
|
42 | + define('thAssigned', 5); // Set by assigner |
|
43 | 43 | |
44 | 44 | /* The TaskState value is used to differentiate the version of a task in the assigner's folder and the version in the |
45 | 45 | * assignee's folder. The buttons shown depend on this and the 'taskaccepted' boolean (for the assignee) |
46 | 46 | */ |
47 | - define('tdsNOM', 0); // Got a response to a deleted task, and re-created the task for the assigner |
|
48 | - define('tdsOWNNEW', 1); // Not assigned |
|
49 | - define('tdsOWN', 2); // Assignee version |
|
50 | - define('tdsACC', 3); // Assigner version |
|
51 | - define('tdsDEC', 4); // Assigner version, but assignee declined |
|
47 | + define('tdsNOM', 0); // Got a response to a deleted task, and re-created the task for the assigner |
|
48 | + define('tdsOWNNEW', 1); // Not assigned |
|
49 | + define('tdsOWN', 2); // Assignee version |
|
50 | + define('tdsACC', 3); // Assigner version |
|
51 | + define('tdsDEC', 4); // Assigner version, but assignee declined |
|
52 | 52 | |
53 | 53 | /* The delegationstate is used for the assigner to indicate state |
54 | 54 | */ |
@@ -60,14 +60,14 @@ discard block |
||
60 | 60 | /* The task ownership indicates the role of the current user relative to the task. |
61 | 61 | */ |
62 | 62 | define('olNewTask', 0); |
63 | - define('olDelegatedTask', 1); // Task has been assigned |
|
64 | - define('olOwnTask', 2); // Task owned |
|
63 | + define('olDelegatedTask', 1); // Task has been assigned |
|
64 | + define('olOwnTask', 2); // Task owned |
|
65 | 65 | |
66 | 66 | /* taskmultrecips indicates whether the task request sent or received has multiple assignees or not. |
67 | 67 | */ |
68 | 68 | define('tmrNone', 0); |
69 | - define('tmrSent', 1); // Task has been sent to multiple assignee |
|
70 | - define('tmrReceived', 2); // Task Request received has multiple assignee |
|
69 | + define('tmrSent', 1); // Task has been sent to multiple assignee |
|
70 | + define('tmrReceived', 2); // Task Request received has multiple assignee |
|
71 | 71 | |
72 | 72 | class TaskRequest { |
73 | 73 | // All recipient properties |
@@ -265,13 +265,13 @@ discard block |
||
265 | 265 | // Set properties on Task Request |
266 | 266 | mapi_setprops($this->message, [ |
267 | 267 | $this->props['taskglobalobjid'] => $taskid, /* our new taskglobalobjid */ |
268 | - $this->props['taskstate'] => tdsACC, /* state for our outgoing request */ |
|
269 | - $this->props['taskmode'] => tdmtNothing, /* we're not sending a change */ |
|
270 | - $this->props['updatecount'] => 2, /* version 2 (no idea) */ |
|
268 | + $this->props['taskstate'] => tdsACC, /* state for our outgoing request */ |
|
269 | + $this->props['taskmode'] => tdmtNothing, /* we're not sending a change */ |
|
270 | + $this->props['updatecount'] => 2, /* version 2 (no idea) */ |
|
271 | 271 | $this->props['delegationstate'] => olTaskDelegationUnknown, /* no reply yet */ |
272 | 272 | $this->props['ownership'] => olDelegatedTask, /* Task has been assigned */ |
273 | - $this->props['taskhistory'] => thAssigned, /* Task has been assigned */ |
|
274 | - PR_ICON_INDEX => 1283, /* Task request icon */ |
|
273 | + $this->props['taskhistory'] => thAssigned, /* Task has been assigned */ |
|
274 | + PR_ICON_INDEX => 1283, /* Task request icon */ |
|
275 | 275 | ]); |
276 | 276 | $this->setLastUser(); |
277 | 277 | $this->setOwnerForAssignor(); |
@@ -284,17 +284,17 @@ discard block |
||
284 | 284 | |
285 | 285 | // Make it a task request, and put it in sent items after it is sent |
286 | 286 | mapi_setprops($outgoing, [ |
287 | - PR_MESSAGE_CLASS => "IPM.TaskRequest", /* class is task request */ |
|
288 | - $this->props['taskstate'] => tdsOWNNEW, /* for the recipient the task is new */ |
|
289 | - $this->props['taskmode'] => tdmtTaskReq, /* for the recipient, it is a request */ |
|
290 | - $this->props['updatecount'] => 1, /* version 2 is in the attachment */ |
|
287 | + PR_MESSAGE_CLASS => "IPM.TaskRequest", /* class is task request */ |
|
288 | + $this->props['taskstate'] => tdsOWNNEW, /* for the recipient the task is new */ |
|
289 | + $this->props['taskmode'] => tdmtTaskReq, /* for the recipient, it is a request */ |
|
290 | + $this->props['updatecount'] => 1, /* version 2 is in the attachment */ |
|
291 | 291 | PR_SUBJECT => $prefix . $messageprops[PR_SUBJECT], |
292 | - PR_ICON_INDEX => 0xFFFFFFFF, /* show assigned icon */ |
|
292 | + PR_ICON_INDEX => 0xFFFFFFFF, /* show assigned icon */ |
|
293 | 293 | ]); |
294 | 294 | |
295 | 295 | // Set Body |
296 | 296 | $body = $this->getBody(); |
297 | - $stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY); |
|
297 | + $stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, 0, MAPI_CREATE|MAPI_MODIFY); |
|
298 | 298 | mapi_stream_setsize($stream, strlen($body)); |
299 | 299 | mapi_stream_write($stream, $body); |
300 | 300 | mapi_stream_commit($stream); |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | $attach = mapi_message_createattach($outgoing); |
303 | 303 | mapi_setprops($attach, [PR_ATTACH_METHOD => ATTACH_EMBEDDED_MSG, PR_DISPLAY_NAME => $messageprops[PR_SUBJECT]]); |
304 | 304 | |
305 | - $sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_MODIFY | MAPI_CREATE); |
|
305 | + $sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_MODIFY|MAPI_CREATE); |
|
306 | 306 | |
307 | 307 | mapi_copyto($this->message, [], [], $sub); |
308 | 308 | mapi_savechanges($sub); |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | $this->updateTaskRequest(); |
405 | 405 | |
406 | 406 | // Set as accepted |
407 | - mapi_setprops($this->message, [$this->props['taskhistory'] => thAccepted, $this->props['assignedtime'] => time(), $this->props['taskaccepted'] => true, $this->props['delegationstate'] => olTaskNotDelegated]); |
|
407 | + mapi_setprops($this->message, [$this->props['taskhistory'] => thAccepted, $this->props['assignedtime'] => time(), $this->props['taskaccepted'] => true, $this->props['delegationstate'] => olTaskNotDelegated]); |
|
408 | 408 | |
409 | 409 | mapi_savechanges($this->message); |
410 | 410 | |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | $this->updateTaskRequest(); |
434 | 434 | |
435 | 435 | // Set as declined |
436 | - mapi_setprops($this->message, [$this->props['taskhistory'] => thDeclined, $this->props['delegationstate'] => olTaskDelegationDeclined]); |
|
436 | + mapi_setprops($this->message, [$this->props['taskhistory'] => thDeclined, $this->props['delegationstate'] => olTaskDelegationDeclined]); |
|
437 | 437 | |
438 | 438 | mapi_savechanges($this->message); |
439 | 439 | |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | |
476 | 476 | $this->setRecipientsForResponse($outgoing, tdmtTaskUpd, true); |
477 | 477 | $body = $this->getBody(); |
478 | - $stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY); |
|
478 | + $stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, 0, MAPI_CREATE|MAPI_MODIFY); |
|
479 | 479 | mapi_stream_setsize($stream, strlen($body)); |
480 | 480 | mapi_stream_write($stream, $body); |
481 | 481 | mapi_stream_commit($stream); |
@@ -600,7 +600,7 @@ discard block |
||
600 | 600 | |
601 | 601 | $attach = mapi_message_createattach($outgoing); |
602 | 602 | mapi_setprops($attach, [PR_ATTACH_METHOD => ATTACH_EMBEDDED_MSG, PR_DISPLAY_NAME => $messageprops[PR_SUBJECT], PR_ATTACHMENT_HIDDEN => true]); |
603 | - $sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_CREATE | MAPI_MODIFY); |
|
603 | + $sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_CREATE|MAPI_MODIFY); |
|
604 | 604 | |
605 | 605 | mapi_copyto($this->message, [], [PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_ADDRTYPE, PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_SEARCH_KEY], $outgoing); |
606 | 606 | mapi_copyto($this->message, [], [], $sub); |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | |
629 | 629 | // Set Body |
630 | 630 | $body = $this->getBody(); |
631 | - $stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY); |
|
631 | + $stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, 0, MAPI_CREATE|MAPI_MODIFY); |
|
632 | 632 | mapi_stream_setsize($stream, strlen($body)); |
633 | 633 | mapi_stream_write($stream, $body); |
634 | 634 | mapi_stream_commit($stream); |
@@ -867,7 +867,7 @@ discard block |
||
867 | 867 | } |
868 | 868 | |
869 | 869 | foreach ($recips as $recip) { |
870 | - $recip[PR_RECIPIENT_TYPE] = MAPI_TO; // Change recipient type to MAPI_TO |
|
870 | + $recip[PR_RECIPIENT_TYPE] = MAPI_TO; // Change recipient type to MAPI_TO |
|
871 | 871 | mapi_message_modifyrecipients($outgoing, MODRECIP_ADD, [$recip]); |
872 | 872 | } |
873 | 873 |