Test Failed
Push — master ( 785041...a5702e )
by
unknown
14:18
created
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.
server/includes/core/class.indexsqlite.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 		$r3 = ($eid >> 32) & 0xFF;
22 22
 		$r4 = ($eid >> 24) & 0xFF;
23 23
 		$r5 = ($eid >> 16) & 0xFF;
24
-		$value = $r0 | ($r1 << 8) | ($r2 << 16) | ($r3 << 24) | ($r4 << 32) | ($r5 << 40);
24
+		$value = $r0|($r1 << 8)|($r2 << 16)|($r3 << 24)|($r4 << 32)|($r5 << 40);
25 25
 
26 26
 		return $value;
27 27
 	}
Please login to merge, or discard this patch.
server/includes/core/class.settings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 				}
515 515
 
516 516
 				try {
517
-					$stream = mapi_openproperty($this->store, PR_EC_WEBACCESS_SETTINGS_JSON, IID_IStream, STGM_TRANSACTED, MAPI_CREATE | MAPI_MODIFY);
517
+					$stream = mapi_openproperty($this->store, PR_EC_WEBACCESS_SETTINGS_JSON, IID_IStream, STGM_TRANSACTED, MAPI_CREATE|MAPI_MODIFY);
518 518
 					mapi_stream_setsize($stream, strlen($settings));
519 519
 					mapi_stream_write($stream, $settings);
520 520
 					mapi_stream_commit($stream);
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
 
541 541
 			// Check if the settings have been changed.
542 542
 			if ($this->persistentSettingsString !== $persistentSettings) {
543
-				$stream = mapi_openproperty($this->store, PR_EC_WEBAPP_PERSISTENT_SETTINGS_JSON, IID_IStream, STGM_TRANSACTED, MAPI_CREATE | MAPI_MODIFY);
543
+				$stream = mapi_openproperty($this->store, PR_EC_WEBAPP_PERSISTENT_SETTINGS_JSON, IID_IStream, STGM_TRANSACTED, MAPI_CREATE|MAPI_MODIFY);
544 544
 				mapi_stream_setsize($stream, strlen($persistentSettings));
545 545
 				mapi_stream_write($stream, $persistentSettings);
546 546
 				mapi_stream_commit($stream);
Please login to merge, or discard this patch.