Test Failed
Branch master (2f190b)
by Mike
11:47
created
server/includes/mapi/class.recurrence.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
 			$props[PR_EXCEPTION_ENDTIME] = $this->fromGMT($this->tz, $exception_props[$this->proptags["duedate"]]);
740 740
 			mapi_setprops($attachment, $props);
741 741
 
742
-			$imessage = mapi_attach_openobj($attachment, MAPI_CREATE | MAPI_MODIFY);
742
+			$imessage = mapi_attach_openobj($attachment, MAPI_CREATE|MAPI_MODIFY);
743 743
 
744 744
 			if ($copy_attach_from) {
745 745
 				$attachmentTable = mapi_message_getattachmenttable($copy_attach_from);
@@ -1120,13 +1120,13 @@  discard block
 block discarded – undo
1120 1120
 			// Remove all deleted recipients
1121 1121
 			if (isset($exception_recips['remove'])) {
1122 1122
 				foreach ($exception_recips['remove'] as &$recip) {
1123
-					if (!isset($recip[PR_RECIPIENT_FLAGS]) || $recip[PR_RECIPIENT_FLAGS] != (recipReserved | recipExceptionalDeleted | recipSendable)) {
1124
-						$recip[PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalDeleted;
1123
+					if (!isset($recip[PR_RECIPIENT_FLAGS]) || $recip[PR_RECIPIENT_FLAGS] != (recipReserved|recipExceptionalDeleted|recipSendable)) {
1124
+						$recip[PR_RECIPIENT_FLAGS] = recipSendable|recipExceptionalDeleted;
1125 1125
 					}
1126 1126
 					else {
1127
-						$recip[PR_RECIPIENT_FLAGS] = recipReserved | recipExceptionalDeleted | recipSendable;
1127
+						$recip[PR_RECIPIENT_FLAGS] = recipReserved|recipExceptionalDeleted|recipSendable;
1128 1128
 					}
1129
-					$recip[PR_RECIPIENT_TRACKSTATUS] = olResponseNone;		// No Response required
1129
+					$recip[PR_RECIPIENT_TRACKSTATUS] = olResponseNone; // No Response required
1130 1130
 				}
1131 1131
 				unset($recip);
1132 1132
 				mapi_message_modifyrecipients($exception, MODRECIP_MODIFY, $exception_recips['remove']);
@@ -1195,13 +1195,13 @@  discard block
 block discarded – undo
1195 1195
 
1196 1196
 						// If recipient is not in list of deleted recipient, add him
1197 1197
 						if (!$foundInDeletedRecipients) {
1198
-							if (!isset($recipient[PR_RECIPIENT_FLAGS]) || $recipient[PR_RECIPIENT_FLAGS] != (recipReserved | recipExceptionalDeleted | recipSendable)) {
1199
-								$recipient[PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalDeleted;
1198
+							if (!isset($recipient[PR_RECIPIENT_FLAGS]) || $recipient[PR_RECIPIENT_FLAGS] != (recipReserved|recipExceptionalDeleted|recipSendable)) {
1199
+								$recipient[PR_RECIPIENT_FLAGS] = recipSendable|recipExceptionalDeleted;
1200 1200
 							}
1201 1201
 							else {
1202
-								$recipient[PR_RECIPIENT_FLAGS] = recipReserved | recipExceptionalDeleted | recipSendable;
1202
+								$recipient[PR_RECIPIENT_FLAGS] = recipReserved|recipExceptionalDeleted|recipSendable;
1203 1203
 							}
1204
-							$recipient[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone;	// No Response required
1204
+							$recipient[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone; // No Response required
1205 1205
 							$deletedRecipients[] = $recipient;
1206 1206
 						}
1207 1207
 					}
@@ -1261,12 +1261,12 @@  discard block
 block discarded – undo
1261 1261
 			$hasOrganizer = false;
1262 1262
 			// Check if meeting already has an organizer.
1263 1263
 			foreach ($recipients as $key => $recipient) {
1264
-				if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable | recipOrganizer)) {
1264
+				if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable|recipOrganizer)) {
1265 1265
 					$hasOrganizer = true;
1266 1266
 				}
1267 1267
 				elseif ($isException && !isset($recipient[PR_RECIPIENT_FLAGS])) {
1268 1268
 					// Recipients for an occurrence
1269
-					$recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalResponse;
1269
+					$recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable|recipExceptionalResponse;
1270 1270
 				}
1271 1271
 			}
1272 1272
 
@@ -1280,7 +1280,7 @@  discard block
 block discarded – undo
1280 1280
 				$organizer[PR_RECIPIENT_DISPLAY_NAME] = $messageProps[PR_SENT_REPRESENTING_NAME];
1281 1281
 				$organizer[PR_ADDRTYPE] = empty($messageProps[PR_SENT_REPRESENTING_ADDRTYPE]) ? 'SMTP' : $messageProps[PR_SENT_REPRESENTING_ADDRTYPE];
1282 1282
 				$organizer[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone;
1283
-				$organizer[PR_RECIPIENT_FLAGS] = recipSendable | recipOrganizer;
1283
+				$organizer[PR_RECIPIENT_FLAGS] = recipSendable|recipOrganizer;
1284 1284
 				$organizer[PR_SEARCH_KEY] = $messageProps[PR_SENT_REPRESENTING_SEARCH_KEY];
1285 1285
 
1286 1286
 				// Add organizer to recipients list.
Please login to merge, or discard this patch.
server/includes/mapi/mapidefs.php 1 patch
Spacing   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -28,40 +28,40 @@  discard block
 block discarded – undo
28 28
 
29 29
 /* Object type */
30 30
 
31
-define('MAPI_STORE', 0x00000001);    /* Message Store */
32
-define('MAPI_ADDRBOOK', 0x00000002);    /* Address Book */
33
-define('MAPI_FOLDER', 0x00000003);    /* Folder */
34
-define('MAPI_ABCONT', 0x00000004);    /* Address Book Container */
35
-define('MAPI_MESSAGE', 0x00000005);    /* Message */
36
-define('MAPI_MAILUSER', 0x00000006);    /* Individual Recipient */
37
-define('MAPI_ATTACH', 0x00000007);    /* Attachment */
38
-define('MAPI_DISTLIST', 0x00000008);    /* Distribution List Recipient */
39
-define('MAPI_PROFSECT', 0x00000009);    /* Profile Section */
40
-define('MAPI_STATUS', 0x0000000A);    /* Status Object */
41
-define('MAPI_SESSION', 0x0000000B);    /* Session */
42
-define('MAPI_FORMINFO', 0x0000000C);    /* Form Information */
31
+define('MAPI_STORE', 0x00000001); /* Message Store */
32
+define('MAPI_ADDRBOOK', 0x00000002); /* Address Book */
33
+define('MAPI_FOLDER', 0x00000003); /* Folder */
34
+define('MAPI_ABCONT', 0x00000004); /* Address Book Container */
35
+define('MAPI_MESSAGE', 0x00000005); /* Message */
36
+define('MAPI_MAILUSER', 0x00000006); /* Individual Recipient */
37
+define('MAPI_ATTACH', 0x00000007); /* Attachment */
38
+define('MAPI_DISTLIST', 0x00000008); /* Distribution List Recipient */
39
+define('MAPI_PROFSECT', 0x00000009); /* Profile Section */
40
+define('MAPI_STATUS', 0x0000000A); /* Status Object */
41
+define('MAPI_SESSION', 0x0000000B); /* Session */
42
+define('MAPI_FORMINFO', 0x0000000C); /* Form Information */
43 43
 
44 44
 define('MV_FLAG', 0x1000);
45 45
 define('MV_INSTANCE', 0x2000);
46
-define('MVI_FLAG', MV_FLAG | MV_INSTANCE);
47
-
48
-define('PT_UNSPECIFIED', 0);    /* (Reserved for interface use) type doesn't matter to caller */
49
-define('PT_NULL', 1);    /* NULL property value */
50
-define('PT_I2', 2);    /* Signed 16-bit value */
51
-define('PT_LONG', 3);    /* Signed 32-bit value */
52
-define('PT_R4', 4);    /* 4-byte floating point */
53
-define('PT_DOUBLE', 5);    /* Floating point double */
54
-define('PT_CURRENCY', 6);    /* Signed 64-bit int (decimal w/    4 digits right of decimal pt) */
55
-define('PT_APPTIME', 7);    /* Application time */
56
-define('PT_ERROR', 10);    /* 32-bit error value */
57
-define('PT_BOOLEAN', 11);    /* 16-bit boolean (non-zero true) */
58
-define('PT_OBJECT', 13);    /* Embedded object in a property */
59
-define('PT_I8', 20);    /* 8-byte signed integer */
60
-define('PT_STRING8', 30);    /* Null terminated 8-bit character string */
61
-define('PT_UNICODE', 31);    /* Null terminated Unicode string */
62
-define('PT_SYSTIME', 64);    /* FILETIME 64-bit int w/ number of 100ns periods since Jan 1,1601 */
63
-define('PT_CLSID', 72);    /* OLE GUID */
64
-define('PT_BINARY', 258);   /* Uninterpreted (counted byte array) */
46
+define('MVI_FLAG', MV_FLAG|MV_INSTANCE);
47
+
48
+define('PT_UNSPECIFIED', 0); /* (Reserved for interface use) type doesn't matter to caller */
49
+define('PT_NULL', 1); /* NULL property value */
50
+define('PT_I2', 2); /* Signed 16-bit value */
51
+define('PT_LONG', 3); /* Signed 32-bit value */
52
+define('PT_R4', 4); /* 4-byte floating point */
53
+define('PT_DOUBLE', 5); /* Floating point double */
54
+define('PT_CURRENCY', 6); /* Signed 64-bit int (decimal w/    4 digits right of decimal pt) */
55
+define('PT_APPTIME', 7); /* Application time */
56
+define('PT_ERROR', 10); /* 32-bit error value */
57
+define('PT_BOOLEAN', 11); /* 16-bit boolean (non-zero true) */
58
+define('PT_OBJECT', 13); /* Embedded object in a property */
59
+define('PT_I8', 20); /* 8-byte signed integer */
60
+define('PT_STRING8', 30); /* Null terminated 8-bit character string */
61
+define('PT_UNICODE', 31); /* Null terminated Unicode string */
62
+define('PT_SYSTIME', 64); /* FILETIME 64-bit int w/ number of 100ns periods since Jan 1,1601 */
63
+define('PT_CLSID', 72); /* OLE GUID */
64
+define('PT_BINARY', 258); /* Uninterpreted (counted byte array) */
65 65
 /* Changes are likely to these numbers, and to their structures. */
66 66
 
67 67
 /* Alternate property type names for ease of use */
@@ -73,18 +73,18 @@  discard block
 block discarded – undo
73 73
 
74 74
 define('PT_TSTRING', PT_STRING8);
75 75
 
76
-define('PT_MV_I2', (MV_FLAG | PT_I2));
77
-define('PT_MV_LONG', (MV_FLAG | PT_LONG));
78
-define('PT_MV_R4', (MV_FLAG | PT_R4));
79
-define('PT_MV_DOUBLE', (MV_FLAG | PT_DOUBLE));
80
-define('PT_MV_CURRENCY', (MV_FLAG | PT_CURRENCY));
81
-define('PT_MV_APPTIME', (MV_FLAG | PT_APPTIME));
82
-define('PT_MV_SYSTIME', (MV_FLAG | PT_SYSTIME));
83
-define('PT_MV_STRING8', (MV_FLAG | PT_STRING8));
84
-define('PT_MV_BINARY', (MV_FLAG | PT_BINARY));
85
-define('PT_MV_UNICODE', (MV_FLAG | PT_UNICODE));
86
-define('PT_MV_CLSID', (MV_FLAG | PT_CLSID));
87
-define('PT_MV_I8', (MV_FLAG | PT_I8));
76
+define('PT_MV_I2', (MV_FLAG|PT_I2));
77
+define('PT_MV_LONG', (MV_FLAG|PT_LONG));
78
+define('PT_MV_R4', (MV_FLAG|PT_R4));
79
+define('PT_MV_DOUBLE', (MV_FLAG|PT_DOUBLE));
80
+define('PT_MV_CURRENCY', (MV_FLAG|PT_CURRENCY));
81
+define('PT_MV_APPTIME', (MV_FLAG|PT_APPTIME));
82
+define('PT_MV_SYSTIME', (MV_FLAG|PT_SYSTIME));
83
+define('PT_MV_STRING8', (MV_FLAG|PT_STRING8));
84
+define('PT_MV_BINARY', (MV_FLAG|PT_BINARY));
85
+define('PT_MV_UNICODE', (MV_FLAG|PT_UNICODE));
86
+define('PT_MV_CLSID', (MV_FLAG|PT_CLSID));
87
+define('PT_MV_I8', (MV_FLAG|PT_I8));
88 88
 
89 89
 define('PT_MV_TSTRING', PT_MV_STRING8);
90 90
 /* bit 0: set if descending, clear if ascending */
@@ -202,14 +202,14 @@  discard block
 block discarded – undo
202 202
 
203 203
 /* Values for PR_RESOURCE_TYPE, _METHODS, _FLAGS */
204 204
 
205
-define('MAPI_STORE_PROVIDER', 33);    /* Message Store */
206
-define('MAPI_AB', 34);    /* Address Book */
207
-define('MAPI_AB_PROVIDER', 35);    /* Address Book Provider */
208
-define('MAPI_TRANSPORT_PROVIDER', 36);    /* Transport Provider */
209
-define('MAPI_SPOOLER', 37);    /* Message Spooler */
210
-define('MAPI_PROFILE_PROVIDER', 38);    /* Profile Provider */
211
-define('MAPI_SUBSYSTEM', 39);    /* Overall Subsystem Status */
212
-define('MAPI_HOOK_PROVIDER', 40);    /* Spooler Hook */
205
+define('MAPI_STORE_PROVIDER', 33); /* Message Store */
206
+define('MAPI_AB', 34); /* Address Book */
207
+define('MAPI_AB_PROVIDER', 35); /* Address Book Provider */
208
+define('MAPI_TRANSPORT_PROVIDER', 36); /* Transport Provider */
209
+define('MAPI_SPOOLER', 37); /* Message Spooler */
210
+define('MAPI_PROFILE_PROVIDER', 38); /* Profile Provider */
211
+define('MAPI_SUBSYSTEM', 39); /* Overall Subsystem Status */
212
+define('MAPI_HOOK_PROVIDER', 40); /* Spooler Hook */
213 213
 define('STATUS_VALIDATE_STATE', 0x00000001);
214 214
 define('STATUS_SETTINGS_DIALOG', 0x00000002);
215 215
 define('STATUS_CHANGE_PASSWORD', 0x00000004);
@@ -255,10 +255,10 @@  discard block
 block discarded – undo
255 255
 define('MODRECIP_MODIFY', 0x00000004);
256 256
 define('MODRECIP_REMOVE', 0x00000008);
257 257
 
258
-define('MAPI_ORIG', 0);          /* Recipient is message originator */
259
-define('MAPI_TO', 1);          /* Recipient is a primary recipient */
260
-define('MAPI_CC', 2);          /* Recipient is a copy recipient */
261
-define('MAPI_BCC', 3);          /* Recipient is blind copy recipient */
258
+define('MAPI_ORIG', 0); /* Recipient is message originator */
259
+define('MAPI_TO', 1); /* Recipient is a primary recipient */
260
+define('MAPI_CC', 2); /* Recipient is a copy recipient */
261
+define('MAPI_BCC', 3); /* Recipient is blind copy recipient */
262 262
 
263 263
 /* IAttach Interface ------------------------------------------------------- */
264 264
 
@@ -450,23 +450,23 @@  discard block
 block discarded – undo
450 450
 define('BMR_NEZ', 0x00000001);
451 451
 
452 452
 /* array index values of restrictions -- same values are used in php-ext/main.cpp::PHPArraytoSRestriction() */
453
-define('VALUE', 0);        // propval
454
-define('RELOP', 1);        // compare method
455
-define('FUZZYLEVEL', 2);        // string search flags
456
-define('CB', 3);        // size restriction
457
-define('ULTYPE', 4);        // bit mask restriction type BMR_xxx
458
-define('ULMASK', 5);        // bitmask
459
-define('ULPROPTAG', 6);        // property
460
-define('ULPROPTAG1', 7);        // RES_COMPAREPROPS 1st property
461
-define('ULPROPTAG2', 8);        // RES_COMPAREPROPS 2nd property
462
-define('PROPS', 9);        // RES_COMMENT properties
463
-define('RESTRICTION', 10);        // RES_COMMENT and RES_SUBRESTRICTION restriction
453
+define('VALUE', 0); // propval
454
+define('RELOP', 1); // compare method
455
+define('FUZZYLEVEL', 2); // string search flags
456
+define('CB', 3); // size restriction
457
+define('ULTYPE', 4); // bit mask restriction type BMR_xxx
458
+define('ULMASK', 5); // bitmask
459
+define('ULPROPTAG', 6); // property
460
+define('ULPROPTAG1', 7); // RES_COMPAREPROPS 1st property
461
+define('ULPROPTAG2', 8); // RES_COMPAREPROPS 2nd property
462
+define('PROPS', 9); // RES_COMMENT properties
463
+define('RESTRICTION', 10); // RES_COMMENT and RES_SUBRESTRICTION restriction
464 464
 
465 465
 /* GUID's for PR_MDB_PROVIDER */
466
-define("ZARAFA_SERVICE_GUID", makeGuid("{C0A19454-7F29-1B10-A587-08002B2A2517}"));    // default store
467
-define("ZARAFA_STORE_PUBLIC_GUID", makeGuid("{70FAB278-F7AF-CD11-9BC8-00AA002FC45A}"));    // public store
468
-define("ZARAFA_STORE_DELEGATE_GUID", makeGuid("{0077B49E-E474-CE11-8C5E-00AA004254E2}"));    // other store
469
-define('ZARAFA_STORE_ARCHIVER_GUID', makeGuid("{BC8953AD-2E3F-4172-9404-896FF459870F}"));    // archive store
466
+define("ZARAFA_SERVICE_GUID", makeGuid("{C0A19454-7F29-1B10-A587-08002B2A2517}")); // default store
467
+define("ZARAFA_STORE_PUBLIC_GUID", makeGuid("{70FAB278-F7AF-CD11-9BC8-00AA002FC45A}")); // public store
468
+define("ZARAFA_STORE_DELEGATE_GUID", makeGuid("{0077B49E-E474-CE11-8C5E-00AA004254E2}")); // other store
469
+define('ZARAFA_STORE_ARCHIVER_GUID', makeGuid("{BC8953AD-2E3F-4172-9404-896FF459870F}")); // archive store
470 470
 
471 471
 /* global profile section guid */
472 472
 define('pbGlobalProfileSectionGuid', makeGuid("{C8B0DB13-05AA-1A10-9BB0-00AA002FC45A}"));
@@ -498,18 +498,18 @@  discard block
 block discarded – undo
498 498
 define('ecRightsContact', 0x00000200);
499 499
 define('ecRightsFolderVisible', 0x00000400);
500 500
 
501
-define('ecRightsAll', ecRightsReadAny | ecRightsCreate | ecRightsEditOwned | ecRightsDeleteOwned | ecRightsEditAny | ecRightsDeleteAny | ecRightsCreateSubfolder | ecRightsFolderAccess | ecRightsFolderVisible);
502
-define('ecRightsSecretary', ecRightsReadAny | ecRightsCreate | ecRightsEditOwned | ecRightsDeleteOwned | ecRightsEditAny | ecRightsDeleteAny | ecRightsFolderVisible);
503
-define('ecRightsFullControl', ecRightsReadAny | ecRightsCreate | ecRightsEditOwned | ecRightsDeleteOwned | ecRightsEditAny | ecRightsDeleteAny | ecRightsCreateSubfolder | ecRightsFolderVisible);
504
-define('ecRightsContributor', ecRightsFolderVisible | ecRightsCreate);
505
-define('ecRightsReviewer', ecRightsReadAny | ecRightsFolderVisible);
506
-define('ecRightsNonEditingAuthor', ecRightsReadAny | ecRightsFolderVisible | ecRightsCreate | ecRightsDeleteOwned);
507
-define('ecRightsAuthor', ecRightsReadAny | ecRightsFolderVisible | ecRightsCreate | ecRightsDeleteOwned | ecRightsEditOwned);
508
-define('ecRightsPublishingAuthor', ecRightsReadAny | ecRightsFolderVisible | ecRightsCreate | ecRightsDeleteOwned | ecRightsEditOwned | ecRightsCreateSubfolder);
509
-define('ecRightsEditor', ecRightsReadAny | ecRightsFolderVisible | ecRightsCreate | ecRightsDeleteOwned | ecRightsEditOwned | ecRightsEditAny | ecRightsDeleteAny);
510
-define('ecRightsPublishingEditor', ecRightsReadAny | ecRightsFolderVisible | ecRightsCreate | ecRightsDeleteOwned | ecRightsEditOwned | ecRightsEditAny | ecRightsDeleteAny | ecRightsCreateSubfolder);
511
-define('ecRightsDefault', ecRightsNone | ecRightsFolderVisible);
512
-define('ecRightsDefaultPublic', ecRightsReadAny | ecRightsFolderVisible);
501
+define('ecRightsAll', ecRightsReadAny|ecRightsCreate|ecRightsEditOwned|ecRightsDeleteOwned|ecRightsEditAny|ecRightsDeleteAny|ecRightsCreateSubfolder|ecRightsFolderAccess|ecRightsFolderVisible);
502
+define('ecRightsSecretary', ecRightsReadAny|ecRightsCreate|ecRightsEditOwned|ecRightsDeleteOwned|ecRightsEditAny|ecRightsDeleteAny|ecRightsFolderVisible);
503
+define('ecRightsFullControl', ecRightsReadAny|ecRightsCreate|ecRightsEditOwned|ecRightsDeleteOwned|ecRightsEditAny|ecRightsDeleteAny|ecRightsCreateSubfolder|ecRightsFolderVisible);
504
+define('ecRightsContributor', ecRightsFolderVisible|ecRightsCreate);
505
+define('ecRightsReviewer', ecRightsReadAny|ecRightsFolderVisible);
506
+define('ecRightsNonEditingAuthor', ecRightsReadAny|ecRightsFolderVisible|ecRightsCreate|ecRightsDeleteOwned);
507
+define('ecRightsAuthor', ecRightsReadAny|ecRightsFolderVisible|ecRightsCreate|ecRightsDeleteOwned|ecRightsEditOwned);
508
+define('ecRightsPublishingAuthor', ecRightsReadAny|ecRightsFolderVisible|ecRightsCreate|ecRightsDeleteOwned|ecRightsEditOwned|ecRightsCreateSubfolder);
509
+define('ecRightsEditor', ecRightsReadAny|ecRightsFolderVisible|ecRightsCreate|ecRightsDeleteOwned|ecRightsEditOwned|ecRightsEditAny|ecRightsDeleteAny);
510
+define('ecRightsPublishingEditor', ecRightsReadAny|ecRightsFolderVisible|ecRightsCreate|ecRightsDeleteOwned|ecRightsEditOwned|ecRightsEditAny|ecRightsDeleteAny|ecRightsCreateSubfolder);
511
+define('ecRightsDefault', ecRightsNone|ecRightsFolderVisible);
512
+define('ecRightsDefaultPublic', ecRightsReadAny|ecRightsFolderVisible);
513 513
 define('ecRightsAdmin', 0x00001000);
514 514
 define('ecRightsAllMask', 0x000015FB);
515 515
 
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
 define('ROW_ADD', 0x0001);
526 526
 define('ROW_MODIFY', 0x0002);
527 527
 define('ROW_REMOVE', 0x0004);
528
-define('ROW_EMPTY', (ROW_ADD | ROW_REMOVE));
528
+define('ROW_EMPTY', (ROW_ADD|ROW_REMOVE));
529 529
 
530 530
 // new property types
531 531
 define('PT_SRESTRICTION', 0x00FD);
@@ -595,38 +595,38 @@  discard block
 block discarded – undo
595 595
 define('SYNC_NO_FOREIGN_KEYS', 0x100);
596 596
 define('SYNC_LIMITED_IMESSAGE', 0x200);
597 597
 define('SYNC_CATCHUP', 0x400);
598
-define('SYNC_NEW_MESSAGE', 0x800);         // only applicable to ImportMessageChange()
599
-define('SYNC_MSG_SELECTIVE', 0x1000);        // Used internally.      Will reject if used by clients.
598
+define('SYNC_NEW_MESSAGE', 0x800); // only applicable to ImportMessageChange()
599
+define('SYNC_MSG_SELECTIVE', 0x1000); // Used internally.      Will reject if used by clients.
600 600
 define('SYNC_BEST_BODY', 0x2000);
601 601
 define('SYNC_IGNORE_SPECIFIED_ON_ASSOCIATED', 0x4000);
602
-define('SYNC_PROGRESS_MODE', 0x8000);        // AirMapi progress mode
602
+define('SYNC_PROGRESS_MODE', 0x8000); // AirMapi progress mode
603 603
 define('SYNC_FXRECOVERMODE', 0x10000);
604 604
 define('SYNC_DEFER_CONFIG', 0x20000);
605
-define('SYNC_FORCE_UNICODE', 0x40000);       // Forces server to return Unicode properties
606
-define('SYNC_STATE_READONLY', 0x80000);       // Server will not update the states in the DB, setting up exporter with this flag states are read only
605
+define('SYNC_FORCE_UNICODE', 0x40000); // Forces server to return Unicode properties
606
+define('SYNC_STATE_READONLY', 0x80000); // Server will not update the states in the DB, setting up exporter with this flag states are read only
607 607
 
608
-define('EMS_AB_ADDRESS_LOOKUP', 0x00000001);    // Flag for resolvename to resolve only exact matches
608
+define('EMS_AB_ADDRESS_LOOKUP', 0x00000001); // Flag for resolvename to resolve only exact matches
609 609
 
610
-define('TBL_BATCH', 0x00000002);    // Batch multiple table commands
610
+define('TBL_BATCH', 0x00000002); // Batch multiple table commands
611 611
 
612 612
 /* Flags for recipients in exceptions */
613
-define('recipSendable', 0x00000001);    // sendable attendee.
614
-define('recipOrganizer', 0x00000002);    // meeting organizer
615
-define('recipExceptionalResponse', 0x00000010);    // attendee gave a response for the exception
616
-define('recipExceptionalDeleted', 0x00000020);    // recipientRow exists, but it is treated as if the corresponding recipient is deleted from meeting
617
-define('recipOriginal', 0x00000100);    // recipient is an original Attendee
613
+define('recipSendable', 0x00000001); // sendable attendee.
614
+define('recipOrganizer', 0x00000002); // meeting organizer
615
+define('recipExceptionalResponse', 0x00000010); // attendee gave a response for the exception
616
+define('recipExceptionalDeleted', 0x00000020); // recipientRow exists, but it is treated as if the corresponding recipient is deleted from meeting
617
+define('recipOriginal', 0x00000100); // recipient is an original Attendee
618 618
 define('recipReserved', 0x00000200);
619 619
 
620 620
 /* Flags which indicates type of Meeting Object */
621
-define('mtgEmpty', 0x00000000);    // Unspecified.
622
-define('mtgRequest', 0x00000001);    // Initial meeting request.
623
-define('mtgFull', 0x00010000);    // Full update.
624
-define('mtgInfo', 0x00020000);    // Informational update.
625
-define('mtgOutOfDate', 0x00080000);    // A newer Meeting Request object or Meeting Update object was received after this one.
626
-define('mtgDelegatorCopy', 0x00100000);    // This is set on the delegator's copy when a delegate will handle meeting-related objects.
627
-
628
-define('MAPI_ONE_OFF_UNICODE', 0x8000);        // the flag that defines whether the embedded strings are Unicode in one off entryids.
629
-define('MAPI_ONE_OFF_NO_RICH_INFO', 0x0001);        // the flag that specifies whether the recipient gets TNEF or not.
621
+define('mtgEmpty', 0x00000000); // Unspecified.
622
+define('mtgRequest', 0x00000001); // Initial meeting request.
623
+define('mtgFull', 0x00010000); // Full update.
624
+define('mtgInfo', 0x00020000); // Informational update.
625
+define('mtgOutOfDate', 0x00080000); // A newer Meeting Request object or Meeting Update object was received after this one.
626
+define('mtgDelegatorCopy', 0x00100000); // This is set on the delegator's copy when a delegate will handle meeting-related objects.
627
+
628
+define('MAPI_ONE_OFF_UNICODE', 0x8000); // the flag that defines whether the embedded strings are Unicode in one off entryids.
629
+define('MAPI_ONE_OFF_NO_RICH_INFO', 0x0001); // the flag that specifies whether the recipient gets TNEF or not.
630 630
 
631 631
 /* Mask flags for mapi_msgstore_advise */
632 632
 define('fnevCriticalError', 0x00000001);
Please login to merge, or discard this patch.
server/includes/mapi/class.meetingrequest.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
 		$properties['recurrence_data'] = 'PT_BINARY:PSETID_Appointment:0x8216';
134 134
 		$properties['reminderminutes'] = 'PT_LONG:PSETID_Common:0x8501';
135 135
 		$properties['reminderset'] = 'PT_BOOLEAN:PSETID_Common:0x8503';
136
-		$properties['updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8201';					// AppointmentSequenceNumber
137
-		$properties['last_updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8203';			// AppointmentLastSequence
136
+		$properties['updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8201'; // AppointmentSequenceNumber
137
+		$properties['last_updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8203'; // AppointmentLastSequence
138 138
 		$properties['busystatus'] = 'PT_LONG:PSETID_Appointment:0x8205';
139 139
 		$properties['intendedbusystatus'] = 'PT_LONG:PSETID_Appointment:0x8224';
140 140
 		$properties['start'] = 'PT_SYSTIME:PSETID_Appointment:0x820d';
141 141
 		$properties['responselocation'] = 'PT_STRING8:PSETID_Meeting:0x2';
142 142
 		$properties['location'] = 'PT_STRING8:PSETID_Appointment:0x8208';
143
-		$properties['requestsent'] = 'PT_BOOLEAN:PSETID_Appointment:0x8229';		// PidLidFInvited, MeetingRequestWasSent
143
+		$properties['requestsent'] = 'PT_BOOLEAN:PSETID_Appointment:0x8229'; // PidLidFInvited, MeetingRequestWasSent
144 144
 		$properties['startdate'] = 'PT_SYSTIME:PSETID_Appointment:0x820d';
145 145
 		$properties['duedate'] = 'PT_SYSTIME:PSETID_Appointment:0x820e';
146 146
 		$properties["flagdueby"] = "PT_SYSTIME:PSETID_Common:0x8560";
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
 		$properties['recurring'] = 'PT_BOOLEAN:PSETID_Appointment:0x8223';
150 150
 		$properties['clipstart'] = 'PT_SYSTIME:PSETID_Appointment:0x8235';
151 151
 		$properties['clipend'] = 'PT_SYSTIME:PSETID_Appointment:0x8236';
152
-		$properties['start_recur_date'] = 'PT_LONG:PSETID_Meeting:0xD';				// StartRecurTime
153
-		$properties['start_recur_time'] = 'PT_LONG:PSETID_Meeting:0xE';				// StartRecurTime
154
-		$properties['end_recur_date'] = 'PT_LONG:PSETID_Meeting:0xF';				// EndRecurDate
155
-		$properties['end_recur_time'] = 'PT_LONG:PSETID_Meeting:0x10';				// EndRecurTime
156
-		$properties['is_exception'] = 'PT_BOOLEAN:PSETID_Meeting:0xA';				// LID_IS_EXCEPTION
152
+		$properties['start_recur_date'] = 'PT_LONG:PSETID_Meeting:0xD'; // StartRecurTime
153
+		$properties['start_recur_time'] = 'PT_LONG:PSETID_Meeting:0xE'; // StartRecurTime
154
+		$properties['end_recur_date'] = 'PT_LONG:PSETID_Meeting:0xF'; // EndRecurDate
155
+		$properties['end_recur_time'] = 'PT_LONG:PSETID_Meeting:0x10'; // EndRecurTime
156
+		$properties['is_exception'] = 'PT_BOOLEAN:PSETID_Meeting:0xA'; // LID_IS_EXCEPTION
157 157
 		$properties['apptreplyname'] = 'PT_STRING8:PSETID_Appointment:0x8230';
158 158
 		// Propose new time properties
159 159
 		$properties['proposed_start_whole'] = 'PT_SYSTIME:PSETID_Appointment:0x8250';
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 		$listProperties['rcvd_representing_search_key'] = PR_RCVD_REPRESENTING_SEARCH_KEY;
527 527
 		$messageProps = mapi_getprops($this->message, $listProperties);
528 528
 
529
-		$goid = $messageProps[$this->proptags['goid']];	// GlobalID (0x3)
529
+		$goid = $messageProps[$this->proptags['goid']]; // GlobalID (0x3)
530 530
 		if (!isset($goid)) {
531 531
 			return;
532 532
 		}
@@ -1460,7 +1460,7 @@  discard block
 block discarded – undo
1460 1460
 		$props[$this->proptags['goid2']] = $goid;
1461 1461
 
1462 1462
 		if (!isset($props[$this->proptags['updatecounter']])) {
1463
-			$props[$this->proptags['updatecounter']] = 0;			// OL also starts sequence no with zero.
1463
+			$props[$this->proptags['updatecounter']] = 0; // OL also starts sequence no with zero.
1464 1464
 			$props[$this->proptags['last_updatecounter']] = 0;
1465 1465
 		}
1466 1466
 
@@ -2309,12 +2309,12 @@  discard block
 block discarded – undo
2309 2309
 		$hasOrganizer = false;
2310 2310
 		// Check if meeting already has an organizer.
2311 2311
 		foreach ($recipients as $key => $recipient) {
2312
-			if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable | recipOrganizer)) {
2312
+			if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable|recipOrganizer)) {
2313 2313
 				$hasOrganizer = true;
2314 2314
 			}
2315 2315
 			elseif ($isException && !isset($recipient[PR_RECIPIENT_FLAGS])) {
2316 2316
 				// Recipients for an occurrence
2317
-				$recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalResponse;
2317
+				$recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable|recipExceptionalResponse;
2318 2318
 			}
2319 2319
 		}
2320 2320
 
@@ -2328,7 +2328,7 @@  discard block
 block discarded – undo
2328 2328
 			$organizer[PR_RECIPIENT_DISPLAY_NAME] = $messageProps[PR_SENT_REPRESENTING_NAME];
2329 2329
 			$organizer[PR_ADDRTYPE] = empty($messageProps[PR_SENT_REPRESENTING_ADDRTYPE]) ? 'SMTP' : $messageProps[PR_SENT_REPRESENTING_ADDRTYPE];
2330 2330
 			$organizer[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone;
2331
-			$organizer[PR_RECIPIENT_FLAGS] = recipSendable | recipOrganizer;
2331
+			$organizer[PR_RECIPIENT_FLAGS] = recipSendable|recipOrganizer;
2332 2332
 			$organizer[PR_SEARCH_KEY] = $messageProps[PR_SENT_REPRESENTING_SEARCH_KEY];
2333 2333
 
2334 2334
 			// Add organizer to recipients list.
@@ -2511,7 +2511,7 @@  discard block
 block discarded – undo
2511 2511
 		// Get resource recipients
2512 2512
 		$getResourcesRestriction = [RES_AND,
2513 2513
 			[[RES_PROPERTY,
2514
-				[RELOP => RELOP_EQ,	// Equals recipient type 3: Resource
2514
+				[RELOP => RELOP_EQ, // Equals recipient type 3: Resource
2515 2515
 					ULPROPTAG => PR_RECIPIENT_TYPE,
2516 2516
 					VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC],
2517 2517
 				],
@@ -2787,7 +2787,7 @@  discard block
 block discarded – undo
2787 2787
 		// Get resource recipients
2788 2788
 		$getResourcesRestriction = [RES_AND,
2789 2789
 			[[RES_PROPERTY,
2790
-				[RELOP => RELOP_EQ,	// Equals recipient type 3: Resource
2790
+				[RELOP => RELOP_EQ, // Equals recipient type 3: Resource
2791 2791
 					ULPROPTAG => PR_RECIPIENT_TYPE,
2792 2792
 					VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC],
2793 2793
 				],
@@ -2999,7 +2999,7 @@  discard block
 block discarded – undo
2999 2999
 			// In direct-booking mode, we don't need to send cancellations to resources
3000 3000
 			if ($this->enableDirectBooking) {
3001 3001
 				$restriction[1][] = [RES_PROPERTY,
3002
-					[RELOP => RELOP_NE,	// Does not equal recipient type: MAPI_BCC (Resource)
3002
+					[RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource)
3003 3003
 						ULPROPTAG => PR_RECIPIENT_TYPE,
3004 3004
 						VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC],
3005 3005
 					],
@@ -3096,7 +3096,7 @@  discard block
 block discarded – undo
3096 3096
 		if ($this->enableDirectBooking) {
3097 3097
 			$stripResourcesRestriction[1][] =
3098 3098
 									[RES_PROPERTY,
3099
-										[RELOP => RELOP_NE,	// Does not equal recipient type: MAPI_BCC (Resource)
3099
+										[RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource)
3100 3100
 											ULPROPTAG => PR_RECIPIENT_TYPE,
3101 3101
 											VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC],
3102 3102
 										],
@@ -3202,7 +3202,7 @@  discard block
 block discarded – undo
3202 3202
 			$newmessageprops[PR_MESSAGE_CLASS] = 'IPM.Schedule.Meeting.Canceled';
3203 3203
 			$newmessageprops[$this->proptags['meetingstatus']] = olMeetingCanceled; // It's a cancel request
3204 3204
 			$newmessageprops[$this->proptags['busystatus']] = fbFree; // set the busy status as free
3205
-			$newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH;	// HIGH Importance
3205
+			$newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH; // HIGH Importance
3206 3206
 			if (isset($newmessageprops[PR_SUBJECT])) {
3207 3207
 				$newmessageprops[PR_SUBJECT] = dgettext('zarafa', 'Canceled') . ': ' . $newmessageprops[PR_SUBJECT];
3208 3208
 			}
Please login to merge, or discard this patch.
server/includes/mapi/class.taskrequest.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
 	 * carried in the IPM.TaskRequest item (although this information seems
20 20
 	 * redundant due to that information already being available in PR_MESSAGE_CLASS).
21 21
 	 */
22
-	define('tdmtNothing', 0);			// Value in IPM.Task items
23
-	define('tdmtTaskReq', 1);			// Assigner -> Assignee
24
-	define('tdmtTaskAcc', 2);			// Assignee -> Assigner
25
-	define('tdmtTaskDec', 3);			// Assignee -> Assigner
26
-	define('tdmtTaskUpd', 4);			// Assignee -> Assigner
27
-	define('tdmtTaskSELF', 5);			// Assigner -> Assigner (?)
22
+	define('tdmtNothing', 0); // Value in IPM.Task items
23
+	define('tdmtTaskReq', 1); // Assigner -> Assignee
24
+	define('tdmtTaskAcc', 2); // Assignee -> Assigner
25
+	define('tdmtTaskDec', 3); // Assignee -> Assigner
26
+	define('tdmtTaskUpd', 4); // Assignee -> Assigner
27
+	define('tdmtTaskSELF', 5); // Assigner -> Assigner (?)
28 28
 
29 29
 	/* The TaskHistory is used to show the last action on the task
30 30
 	 * on both the assigner and the assignee's side.
@@ -34,22 +34,22 @@  discard block
 block discarded – undo
34 34
 	 * the format 'Accepted by <user> on 01-01-2010 11:00'.
35 35
 	 */
36 36
 	define('thNone', 0);
37
-	define('thAccepted', 1);			// Set by assignee
38
-	define('thDeclined', 2);			// Set by assignee
39
-	define('thUpdated', 3);				// Set by assignee
37
+	define('thAccepted', 1); // Set by assignee
38
+	define('thDeclined', 2); // Set by assignee
39
+	define('thUpdated', 3); // Set by assignee
40 40
 	define('thDueDateChanged', 4);
41
-	define('thAssigned', 5);			// Set by assigner
41
+	define('thAssigned', 5); // Set by assigner
42 42
 
43 43
 	/* The TaskState value is used to differentiate the version of a task
44 44
 	 * in the assigner's folder and the version in the
45 45
 	 * assignee's folder. The buttons shown depend on this and
46 46
 	 * the 'taskaccepted' boolean (for the assignee)
47 47
 	 */
48
-	define('tdsNOM', 0);		// Got a response to a deleted task, and re-created the task for the assigner
49
-	define('tdsOWNNEW', 1);		// Not assigned
50
-	define('tdsOWN', 2);		// Assignee version
51
-	define('tdsACC', 3);		// Assigner version
52
-	define('tdsDEC', 4);		// Assigner version, but assignee declined
48
+	define('tdsNOM', 0); // Got a response to a deleted task, and re-created the task for the assigner
49
+	define('tdsOWNNEW', 1); // Not assigned
50
+	define('tdsOWN', 2); // Assignee version
51
+	define('tdsACC', 3); // Assigner version
52
+	define('tdsDEC', 4); // Assigner version, but assignee declined
53 53
 
54 54
 	/* The TaskAcceptanceState is used for the assigner to indicate state */
55 55
 	define('olTaskNotDelegated', 0);
@@ -59,13 +59,13 @@  discard block
 block discarded – undo
59 59
 
60 60
 	/* The task ownership indicates the role of the current user relative to the task. */
61 61
 	define('olNewTask', 0);
62
-	define('olDelegatedTask', 1);	// Task has been assigned
63
-	define('olOwnTask', 2);			// Task owned
62
+	define('olDelegatedTask', 1); // Task has been assigned
63
+	define('olOwnTask', 2); // Task owned
64 64
 
65 65
 	/* taskmultrecips indicates whether the task request sent or received has multiple assignees or not. */
66 66
 	define('tmrNone', 0);
67
-	define('tmrSent', 1);		// Task has been sent to multiple assignee
68
-	define('tmrReceived', 2);	// Task Request received has multiple assignee
67
+	define('tmrSent', 1); // Task has been sent to multiple assignee
68
+	define('tmrReceived', 2); // Task Request received has multiple assignee
69 69
 
70 70
 	// Task icon index.
71 71
 	define('ICON_TASK_ASSIGNEE', 0x00000502);
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 					VALUE => $goid, ],
294 294
 				];
295 295
 
296
-				$table = mapi_folder_getcontentstable($folder, MAPI_DEFERRED_ERRORS | SHOW_SOFT_DELETES);
296
+				$table = mapi_folder_getcontentstable($folder, MAPI_DEFERRED_ERRORS|SHOW_SOFT_DELETES);
297 297
 				$softDeletedItems = mapi_table_queryallrows($table, [PR_ENTRYID], $restriction);
298 298
 				if (!empty($softDeletedItems)) {
299 299
 					return true;
@@ -500,12 +500,12 @@  discard block
 block discarded – undo
500 500
 			// Set properties on Task Request
501 501
 			mapi_setprops($this->message, [
502 502
 				$this->props['task_goid'] => $taskid, /* our new task_goid */
503
-				$this->props['taskstate'] => tdsACC, 		/* state for our outgoing request */
504
-				$this->props['taskmode'] => tdmtNothing, 	/* we're not sending a change */
505
-				$this->props['updatecount'] => 2,			/* version 2 (no idea) */
503
+				$this->props['taskstate'] => tdsACC, /* state for our outgoing request */
504
+				$this->props['taskmode'] => tdmtNothing, /* we're not sending a change */
505
+				$this->props['updatecount'] => 2, /* version 2 (no idea) */
506 506
 				$this->props['task_acceptance_state'] => olTaskDelegationUnknown, /* no reply yet */
507 507
 				$this->props['ownership'] => olDelegatedTask, /* Task has been assigned */
508
-				$this->props['taskhistory'] => thAssigned,	/* Task has been assigned */
508
+				$this->props['taskhistory'] => thAssigned, /* Task has been assigned */
509 509
 				PR_CONVERSATION_TOPIC => $messageprops[PR_SUBJECT],
510 510
 				PR_ICON_INDEX => ICON_TASK_ASSIGNER,
511 511
 			]);
@@ -522,10 +522,10 @@  discard block
 block discarded – undo
522 522
 
523 523
 			// Make it a task request, and put it in sent items after it is sent
524 524
 			mapi_setprops($outgoing, [
525
-				PR_MESSAGE_CLASS => "IPM.TaskRequest", 		/* class is task request */
526
-				$this->props['taskstate'] => tdsOWN, 	    /* for the recipient he is the task owner */
527
-				$this->props['taskmode'] => tdmtTaskReq,	/* for the recipient it's a request */
528
-				$this->props['updatecount'] => 1,			/* version 2 is in the attachment */
525
+				PR_MESSAGE_CLASS => "IPM.TaskRequest", /* class is task request */
526
+				$this->props['taskstate'] => tdsOWN, /* for the recipient he is the task owner */
527
+				$this->props['taskmode'] => tdmtTaskReq, /* for the recipient it's a request */
528
+				$this->props['updatecount'] => 1, /* version 2 is in the attachment */
529 529
 				PR_SUBJECT_PREFIX => $prefix,
530 530
 				PR_SUBJECT => $prefix . $messageprops[PR_SUBJECT],
531 531
 			]);
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 				PR_ATTACHMENT_HIDDEN => true,
537 537
 				PR_DISPLAY_NAME => $messageprops[PR_SUBJECT], ]);
538 538
 
539
-			$sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_MODIFY | MAPI_CREATE);
539
+			$sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_MODIFY|MAPI_CREATE);
540 540
 
541 541
 			mapi_copyto($this->message, [], [], $sub);
542 542
 			mapi_setprops($sub, [PR_MESSAGE_CLASS => 'IPM.Task']);
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
 
877 877
 			$attach = mapi_message_createattach($outgoing);
878 878
 			mapi_setprops($attach, [PR_ATTACH_METHOD => ATTACH_EMBEDDED_MSG, PR_DISPLAY_NAME => $messageprops[PR_CONVERSATION_TOPIC], PR_ATTACHMENT_HIDDEN => true]);
879
-			$sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_CREATE | MAPI_MODIFY);
879
+			$sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_CREATE|MAPI_MODIFY);
880 880
 
881 881
 			$message = !$this->isTaskRequest() ? $this->message : $this->getAssociatedTask(false);
882 882
 
@@ -927,7 +927,7 @@  discard block
 block discarded – undo
927 927
 			// edit response before sending task response.
928 928
 			if ($this->taskCommentsInfo) {
929 929
 				$comments = $this->getTaskCommentsInfo();
930
-				$stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY);
930
+				$stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, 0, MAPI_CREATE|MAPI_MODIFY);
931 931
 				mapi_stream_setsize($stream, strlen($comments));
932 932
 				mapi_stream_write($stream, $comments);
933 933
 				mapi_stream_commit($stream);
@@ -1181,7 +1181,7 @@  discard block
 block discarded – undo
1181 1181
 				}
1182 1182
 
1183 1183
 				foreach ($recips as $recip) {
1184
-					$recip[PR_RECIPIENT_TYPE] = MAPI_TO;	// Change recipient type to MAPI_TO
1184
+					$recip[PR_RECIPIENT_TYPE] = MAPI_TO; // Change recipient type to MAPI_TO
1185 1185
 					mapi_message_modifyrecipients($outgoing, MODRECIP_ADD, [$recip]);
1186 1186
 				}
1187 1187
 
Please login to merge, or discard this patch.
server/includes/mapi/class.baserecurrence.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -840,11 +840,11 @@  discard block
 block discarded – undo
840 840
 
841 841
 								$dayofweek = gmdate("w", $monthbegindow);
842 842
 								for ($i = 0; $i < 7; ++$i) {
843
-									if ($nday == 5 && (($dayofweek - $i) % 7 >= 0) && (1 << (($dayofweek - $i) % 7)) & $weekdays) {
843
+									if ($nday == 5 && (($dayofweek - $i) % 7 >= 0) && (1 << (($dayofweek - $i) % 7))&$weekdays) {
844 844
 										$day = gmdate("j", $monthbegindow) - $i;
845 845
 										break;
846 846
 									}
847
-									if ($nday != 5 && (1 << (($dayofweek + $i) % 7)) & $weekdays) {
847
+									if ($nday != 5 && (1 << (($dayofweek + $i) % 7))&$weekdays) {
848 848
 										$day = (($nday - 1) * 7) + ($i + 1);
849 849
 										break;
850 850
 									}
@@ -883,11 +883,11 @@  discard block
 block discarded – undo
883 883
 							// Set start on the right day
884 884
 							$dayofweek = gmdate("w", $monthbegindow);
885 885
 							for ($i = 0; $i < 7; ++$i) {
886
-								if ($nday == 5 && (($dayofweek - $i) % 7) >= 0 && (1 << (($dayofweek - $i) % 7)) & $weekdays) {
886
+								if ($nday == 5 && (($dayofweek - $i) % 7) >= 0 && (1 << (($dayofweek - $i) % 7))&$weekdays) {
887 887
 									$day = $i;
888 888
 									break;
889 889
 								}
890
-								if ($nday != 5 && (1 << (($dayofweek + $i) % 7)) & $weekdays) {
890
+								if ($nday != 5 && (1 << (($dayofweek + $i) % 7))&$weekdays) {
891 891
 									$day = ($nday - 1) * 7 + ($i + 1);
892 892
 									break;
893 893
 								}
@@ -1130,11 +1130,11 @@  discard block
 block discarded – undo
1130 1130
 									}
1131 1131
 
1132 1132
 									for ($i = 0; $i < 7; ++$i) {
1133
-										if ($nday == 5 && (1 << ((gmdate("w", $occenddate) - $i) % 7)) & $weekdays) {
1133
+										if ($nday == 5 && (1 << ((gmdate("w", $occenddate) - $i) % 7))&$weekdays) {
1134 1134
 											$occenddate -= $i * 24 * 60 * 60;
1135 1135
 											break;
1136 1136
 										}
1137
-										if ($nday != 5 && (1 << ((gmdate("w", $occenddate) + $i) % 7)) & $weekdays) {
1137
+										if ($nday != 5 && (1 << ((gmdate("w", $occenddate) + $i) % 7))&$weekdays) {
1138 1138
 											$occenddate += ($i + (($nday - 1) * 7)) * 24 * 60 * 60;
1139 1139
 											break;
1140 1140
 										}
@@ -1896,7 +1896,7 @@  discard block
 block discarded – undo
1896 1896
 						}
1897 1897
 						elseif ($this->recur['regen']) {
1898 1898
 							$year_starttime = $this->gmtime($now);
1899
-							$is_next_leapyear = $this->isLeapYear($year_starttime['tm_year'] + 1900 + 1);	// +1 next year
1899
+							$is_next_leapyear = $this->isLeapYear($year_starttime['tm_year'] + 1900 + 1); // +1 next year
1900 1900
 							$now = $daystart + ($is_next_leapyear ? 31622400 /* Leap year in seconds */ : 31536000 /* year in seconds */);
1901 1901
 
1902 1902
 							if ($now <= $dayend) {
Please login to merge, or discard this patch.
server/includes/core/class.conversion.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 						break;
77 77
 
78 78
 					case PT_MV_STRING8:
79
-					case PT_MV_STRING8 | MVI_FLAG:
79
+					case PT_MV_STRING8|MVI_FLAG:
80 80
 						$mv_values = explode(";", $value);
81 81
 						$values = [];
82 82
 
Please login to merge, or discard this patch.
server/includes/core/class.operations.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 				],
449 449
 			]];
450 450
 
451
-			$hierarchyTable = mapi_folder_gethierarchytable($folder, CONVENIENT_DEPTH | MAPI_DEFERRED_ERRORS);
451
+			$hierarchyTable = mapi_folder_gethierarchytable($folder, CONVENIENT_DEPTH|MAPI_DEFERRED_ERRORS);
452 452
 			mapi_table_restrict($hierarchyTable, $restriction, TBL_BATCH);
453 453
 
454 454
 			// Also request PR_DEPTH
@@ -1327,7 +1327,7 @@  discard block
 block discarded – undo
1327 1327
 				if ($hardDelete === true) {
1328 1328
 					// hard delete the message if requested
1329 1329
 					// beware that folder can not be recovered after this and will be deleted from system entirely
1330
-					if (mapi_folder_deletefolder($folder, $entryid, DEL_MESSAGES | DEL_FOLDERS | DELETE_HARD_DELETE)) {
1330
+					if (mapi_folder_deletefolder($folder, $entryid, DEL_MESSAGES|DEL_FOLDERS|DELETE_HARD_DELETE)) {
1331 1331
 						$result = true;
1332 1332
 
1333 1333
 						// if exists, also delete settings made for this folder (client don't need an update for this)
@@ -1339,7 +1339,7 @@  discard block
 block discarded – undo
1339 1339
 						// TODO: check if not only $parententryid=wastebasket, but also the parents of that parent...
1340 1340
 						// if folder is already in wastebasket or softDelete is requested then delete the message
1341 1341
 						if ($msgprops[PR_IPM_WASTEBASKET_ENTRYID] == $parententryid || $softDelete === true) {
1342
-							if (mapi_folder_deletefolder($folder, $entryid, DEL_MESSAGES | DEL_FOLDERS)) {
1342
+							if (mapi_folder_deletefolder($folder, $entryid, DEL_MESSAGES|DEL_FOLDERS)) {
1343 1343
 								$result = true;
1344 1344
 
1345 1345
 								// if exists, also delete settings made for this folder (client don't need an update for this)
@@ -1380,7 +1380,7 @@  discard block
 block discarded – undo
1380 1380
 						}
1381 1381
 					}
1382 1382
 					else {
1383
-						if (mapi_folder_deletefolder($folder, $entryid, DEL_MESSAGES | DEL_FOLDERS)) {
1383
+						if (mapi_folder_deletefolder($folder, $entryid, DEL_MESSAGES|DEL_FOLDERS)) {
1384 1384
 							$result = true;
1385 1385
 
1386 1386
 							// if exists, also delete settings made for this folder (client don't need an update for this)
@@ -2113,7 +2113,7 @@  discard block
 block discarded – undo
2113 2113
 
2114 2114
 				if ($property != false) {
2115 2115
 					// Stream the body to the PR_BODY or PR_HTML property
2116
-					$stream = mapi_openproperty($message, $property, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY);
2116
+					$stream = mapi_openproperty($message, $property, IID_IStream, 0, MAPI_CREATE|MAPI_MODIFY);
2117 2117
 					mapi_stream_setsize($stream, strlen($body));
2118 2118
 					mapi_stream_write($stream, $body);
2119 2119
 					mapi_stream_commit($stream);
@@ -2192,9 +2192,9 @@  discard block
 block discarded – undo
2192 2192
 			$messageProps = [];
2193 2193
 			// It stores the values that is exception allowed or not false -> not allowed
2194 2194
 			$isExceptionAllowed = true;
2195
-			$delete = $actionType == 'delete';	// Flag for MeetingRequest Class whether to send update or cancel mail.
2196
-			$basedate = false;	// Flag for MeetingRequest Class whether to send an exception or not.
2197
-			$isReminderTimeAllowed = true;	// Flag to check reminder minutes is in range of the occurrences
2195
+			$delete = $actionType == 'delete'; // Flag for MeetingRequest Class whether to send update or cancel mail.
2196
+			$basedate = false; // Flag for MeetingRequest Class whether to send an exception or not.
2197
+			$isReminderTimeAllowed = true; // Flag to check reminder minutes is in range of the occurrences
2198 2198
 			$properties = $GLOBALS['properties']->getAppointmentProperties();
2199 2199
 			$send = false;
2200 2200
 			$oldProps = [];
@@ -3115,7 +3115,7 @@  discard block
 block discarded – undo
3115 3115
 				 * convert flags of PR_MESSAGE_FLAGS property to flags that is
3116 3116
 				 * used in mapi_message_setreadflag.
3117 3117
 				 */
3118
-				$flag = MAPI_DEFERRED_ERRORS;		// set unread flag, read receipt will be sent
3118
+				$flag = MAPI_DEFERRED_ERRORS; // set unread flag, read receipt will be sent
3119 3119
 
3120 3120
 				if (($flags & MSGFLAG_RN_PENDING) && isset($msg_action['send_read_receipt']) && $msg_action['send_read_receipt'] == false) {
3121 3121
 					$flag |= SUPPRESS_RECEIPT;
@@ -3327,7 +3327,7 @@  discard block
 block discarded – undo
3327 3327
 						$attachment = mapi_message_createattach($message);
3328 3328
 						mapi_setprops($attachment, $props);
3329 3329
 
3330
-						$imessage = mapi_attach_openobj($attachment, MAPI_CREATE | MAPI_MODIFY);
3330
+						$imessage = mapi_attach_openobj($attachment, MAPI_CREATE|MAPI_MODIFY);
3331 3331
 
3332 3332
 						// Copy the properties from the source message to the attachment
3333 3333
 						mapi_copyto($copyFrom, [], [], $imessage, 0); // includes attachments and recipients
@@ -3367,7 +3367,7 @@  discard block
 block discarded – undo
3367 3367
 						mapi_setprops($attachment, $props);
3368 3368
 
3369 3369
 						// Stream the file to the PR_ATTACH_DATA_BIN property
3370
-						$stream = mapi_openproperty($attachment, PR_ATTACH_DATA_BIN, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY);
3370
+						$stream = mapi_openproperty($attachment, PR_ATTACH_DATA_BIN, IID_IStream, 0, MAPI_CREATE|MAPI_MODIFY);
3371 3371
 						mapi_stream_write($stream, $appointmentStream);
3372 3372
 
3373 3373
 						// Commit the stream and save changes
@@ -3419,7 +3419,7 @@  discard block
 block discarded – undo
3419 3419
 							mapi_setprops($attachment, $props);
3420 3420
 
3421 3421
 							// Stream the file to the PR_ATTACH_DATA_BIN property
3422
-							$stream = mapi_openproperty($attachment, PR_ATTACH_DATA_BIN, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY);
3422
+							$stream = mapi_openproperty($attachment, PR_ATTACH_DATA_BIN, IID_IStream, 0, MAPI_CREATE|MAPI_MODIFY);
3423 3423
 							$handle = fopen($filepath, "r");
3424 3424
 							while (!feof($handle)) {
3425 3425
 								$contents = fread($handle, BLOCK_SIZE);
@@ -3561,7 +3561,7 @@  discard block
 block discarded – undo
3561 3561
 								PR_ATTACH_EXTENSION => $props[PR_ATTACH_EXTENSION] ?? '',
3562 3562
 								PR_ATTACH_FLAGS => $props[PR_ATTACH_FLAGS] ?? 0,
3563 3563
 							]);
3564
-							$newstream = mapi_openproperty($new, PR_ATTACH_DATA_BIN, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY);
3564
+							$newstream = mapi_openproperty($new, PR_ATTACH_DATA_BIN, IID_IStream, 0, MAPI_CREATE|MAPI_MODIFY);
3565 3565
 							mapi_stream_setsize($newstream, $stat['cb']);
3566 3566
 							for ($i = 0; $i < $stat['cb']; $i += BLOCK_SIZE) {
3567 3567
 								mapi_stream_write($newstream, mapi_stream_read($oldstream, BLOCK_SIZE));
@@ -3862,11 +3862,11 @@  discard block
 block discarded – undo
3862 3862
 			foreach ($recipientList as $recipientItem) {
3863 3863
 				if ($isException) {
3864 3864
 					// We do not add organizer to exception msg in organizer's calendar.
3865
-					if (isset($recipientItem[PR_RECIPIENT_FLAGS]) && $recipientItem[PR_RECIPIENT_FLAGS] == (recipSendable | recipOrganizer)) {
3865
+					if (isset($recipientItem[PR_RECIPIENT_FLAGS]) && $recipientItem[PR_RECIPIENT_FLAGS] == (recipSendable|recipOrganizer)) {
3866 3866
 						continue;
3867 3867
 					}
3868 3868
 
3869
-					$recipient[PR_RECIPIENT_FLAGS] = (recipSendable | recipExceptionalResponse | recipReserved);
3869
+					$recipient[PR_RECIPIENT_FLAGS] = (recipSendable|recipExceptionalResponse|recipReserved);
3870 3870
 				}
3871 3871
 
3872 3872
 				if (!empty($recipientItem["smtp_address"]) && empty($recipientItem["email_address"])) {
@@ -4466,7 +4466,7 @@  discard block
 block discarded – undo
4466 4466
 
4467 4467
 			$l_sNewRecipientHistoryJSON = json_encode($recipient_history);
4468 4468
 
4469
-			$stream = mapi_openproperty($store, PR_EC_RECIPIENT_HISTORY_JSON, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY);
4469
+			$stream = mapi_openproperty($store, PR_EC_RECIPIENT_HISTORY_JSON, IID_IStream, 0, MAPI_CREATE|MAPI_MODIFY);
4470 4470
 			mapi_stream_setsize($stream, strlen($l_sNewRecipientHistoryJSON));
4471 4471
 			mapi_stream_write($stream, $l_sNewRecipientHistoryJSON);
4472 4472
 			mapi_stream_commit($stream);
@@ -4674,7 +4674,7 @@  discard block
 block discarded – undo
4674 4674
 						];
4675 4675
 						mapi_setprops($inlineImage, $props);
4676 4676
 
4677
-						$stream = mapi_openproperty($inlineImage, PR_ATTACH_DATA_BIN, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY);
4677
+						$stream = mapi_openproperty($inlineImage, PR_ATTACH_DATA_BIN, IID_IStream, 0, MAPI_CREATE|MAPI_MODIFY);
4678 4678
 						mapi_stream_setsize($stream, strlen($rawImage));
4679 4679
 						mapi_stream_write($stream, $rawImage);
4680 4680
 						mapi_stream_commit($stream);
Please login to merge, or discard this patch.
server/includes/core/class.jsonrequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 		public function execute($json) {
29 29
 			/* If json_encode produces an empty string, wa-js shows an absolutely
30 30
 			 * worthless "Invalid data received from the server" dialog. */
31
-			$jsonflags = JSON_THROW_ON_ERROR | JSON_INVALID_UTF8_SUBSTITUTE;
31
+			$jsonflags = JSON_THROW_ON_ERROR|JSON_INVALID_UTF8_SUBSTITUTE;
32 32
 
33 33
 			try {
34 34
 				// decode JSON data
Please login to merge, or discard this patch.
server/includes/core/class.bus.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 				foreach ($this->registeredStoreNotifiers as $key => &$storeNotifier) {
206 206
 					if ($entryidCmp->compareStoreEntryIds($storeNotifier['entryid'], $storeEntryid)) {
207 207
 						foreach ($storeNotifier as $key => $notifier) {
208
-							if (isset($notifier['events']) && ($notifier['events'] & $event)) {
208
+							if (isset($notifier['events']) && ($notifier['events']&$event)) {
209 209
 								if (!isset($updatedNotifiers[$key])) {
210 210
 									if (isset($this->notifiers[$key]) && is_object($this->notifiers[$key])) {
211 211
 										$this->notifiers[$key]->update($event, $entryID, $data);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 				if (($entryID === REQUEST_ENTRYID && $folderNotifier['entryid'] === REQUEST_ENTRYID) ||
226 226
 					($entryidCmp->compareEntryIds($folderNotifier['entryid'], $entryID))) {
227 227
 					foreach ($folderNotifier as $key => $notifier) {
228
-						if (isset($notifier['events']) && ($notifier['events'] & $event)) {
228
+						if (isset($notifier['events']) && ($notifier['events']&$event)) {
229 229
 							if (!isset($updatedNotifiers[$key])) {
230 230
 								if (isset($this->notifiers[$key]) && is_object($this->notifiers[$key])) {
231 231
 									$this->notifiers[$key]->update($event, $entryID, $data);
Please login to merge, or discard this patch.