@@ -152,15 +152,15 @@ discard block |
||
152 | 152 | $properties['reminderminutes'] = 'PT_LONG:PSETID_Common:0x8501'; |
153 | 153 | $properties['reminderset'] = 'PT_BOOLEAN:PSETID_Common:0x8503'; |
154 | 154 | $properties['sendasical'] = 'PT_BOOLEAN:PSETID_Appointment:0x8200'; |
155 | - $properties['updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8201'; // AppointmentSequenceNumber |
|
156 | - $properties['last_updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8203'; // AppointmentLastSequence |
|
155 | + $properties['updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8201'; // AppointmentSequenceNumber |
|
156 | + $properties['last_updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8203'; // AppointmentLastSequence |
|
157 | 157 | $properties['unknown7'] = 'PT_LONG:PSETID_Appointment:0x8202'; |
158 | 158 | $properties['busystatus'] = 'PT_LONG:PSETID_Appointment:0x8205'; |
159 | 159 | $properties['intendedbusystatus'] = 'PT_LONG:PSETID_Appointment:0x8224'; |
160 | 160 | $properties['start'] = 'PT_SYSTIME:PSETID_Appointment:0x820d'; |
161 | 161 | $properties['responselocation'] = 'PT_STRING8:PSETID_Meeting:0x2'; |
162 | 162 | $properties['location'] = 'PT_STRING8:PSETID_Appointment:0x8208'; |
163 | - $properties['requestsent'] = 'PT_BOOLEAN:PSETID_Appointment:0x8229'; // PidLidFInvited, MeetingRequestWasSent |
|
163 | + $properties['requestsent'] = 'PT_BOOLEAN:PSETID_Appointment:0x8229'; // PidLidFInvited, MeetingRequestWasSent |
|
164 | 164 | $properties['startdate'] = 'PT_SYSTIME:PSETID_Appointment:0x820d'; |
165 | 165 | $properties['duedate'] = 'PT_SYSTIME:PSETID_Appointment:0x820e'; |
166 | 166 | $properties['flagdueby'] = 'PT_SYSTIME:PSETID_Common:0x8560'; |
@@ -169,11 +169,11 @@ discard block |
||
169 | 169 | $properties['recurring'] = 'PT_BOOLEAN:PSETID_Appointment:0x8223'; |
170 | 170 | $properties['clipstart'] = 'PT_SYSTIME:PSETID_Appointment:0x8235'; |
171 | 171 | $properties['clipend'] = 'PT_SYSTIME:PSETID_Appointment:0x8236'; |
172 | - $properties['start_recur_date'] = 'PT_LONG:PSETID_Meeting:0xD'; // StartRecurTime |
|
173 | - $properties['start_recur_time'] = 'PT_LONG:PSETID_Meeting:0xE'; // StartRecurTime |
|
174 | - $properties['end_recur_date'] = 'PT_LONG:PSETID_Meeting:0xF'; // EndRecurDate |
|
175 | - $properties['end_recur_time'] = 'PT_LONG:PSETID_Meeting:0x10'; // EndRecurTime |
|
176 | - $properties['is_exception'] = 'PT_BOOLEAN:PSETID_Meeting:0xA'; // LID_IS_EXCEPTION |
|
172 | + $properties['start_recur_date'] = 'PT_LONG:PSETID_Meeting:0xD'; // StartRecurTime |
|
173 | + $properties['start_recur_time'] = 'PT_LONG:PSETID_Meeting:0xE'; // StartRecurTime |
|
174 | + $properties['end_recur_date'] = 'PT_LONG:PSETID_Meeting:0xF'; // EndRecurDate |
|
175 | + $properties['end_recur_time'] = 'PT_LONG:PSETID_Meeting:0x10'; // EndRecurTime |
|
176 | + $properties['is_exception'] = 'PT_BOOLEAN:PSETID_Meeting:0xA'; // LID_IS_EXCEPTION |
|
177 | 177 | $properties['apptreplyname'] = 'PT_STRING8:PSETID_Appointment:0x8230'; |
178 | 178 | // Propose new time properties |
179 | 179 | $properties['proposed_start_whole'] = 'PT_SYSTIME:PSETID_Appointment:0x8250'; |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | $listProperties['rcvd_representing_search_key'] = PR_RCVD_REPRESENTING_SEARCH_KEY; |
546 | 546 | $messageProps = mapi_getprops($this->message, $listProperties); |
547 | 547 | |
548 | - $goid = $messageProps[$this->proptags['goid']]; // GlobalID (0x3) |
|
548 | + $goid = $messageProps[$this->proptags['goid']]; // GlobalID (0x3) |
|
549 | 549 | if (!isset($goid)) { |
550 | 550 | return; |
551 | 551 | } |
@@ -1443,7 +1443,7 @@ discard block |
||
1443 | 1443 | $props[$this->proptags['goid2']] = $goid; |
1444 | 1444 | |
1445 | 1445 | if (!isset($props[$this->proptags['updatecounter']])) { |
1446 | - $props[$this->proptags['updatecounter']] = 0; // OL also starts sequence no with zero. |
|
1446 | + $props[$this->proptags['updatecounter']] = 0; // OL also starts sequence no with zero. |
|
1447 | 1447 | $props[$this->proptags['last_updatecounter']] = 0; |
1448 | 1448 | } |
1449 | 1449 | |
@@ -2292,12 +2292,12 @@ discard block |
||
2292 | 2292 | $hasOrganizer = false; |
2293 | 2293 | // Check if meeting already has an organizer. |
2294 | 2294 | foreach ($recipients as $key => $recipient) { |
2295 | - if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable | recipOrganizer)) { |
|
2295 | + if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable|recipOrganizer)) { |
|
2296 | 2296 | $hasOrganizer = true; |
2297 | 2297 | } |
2298 | 2298 | elseif ($isException && !isset($recipient[PR_RECIPIENT_FLAGS])) { |
2299 | 2299 | // Recipients for an occurrence |
2300 | - $recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalResponse; |
|
2300 | + $recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable|recipExceptionalResponse; |
|
2301 | 2301 | } |
2302 | 2302 | } |
2303 | 2303 | |
@@ -2311,7 +2311,7 @@ discard block |
||
2311 | 2311 | $organizer[PR_RECIPIENT_DISPLAY_NAME] = $messageProps[PR_SENT_REPRESENTING_NAME]; |
2312 | 2312 | $organizer[PR_ADDRTYPE] = empty($messageProps[PR_SENT_REPRESENTING_ADDRTYPE]) ? 'SMTP' : $messageProps[PR_SENT_REPRESENTING_ADDRTYPE]; |
2313 | 2313 | $organizer[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone; |
2314 | - $organizer[PR_RECIPIENT_FLAGS] = recipSendable | recipOrganizer; |
|
2314 | + $organizer[PR_RECIPIENT_FLAGS] = recipSendable|recipOrganizer; |
|
2315 | 2315 | $organizer[PR_SEARCH_KEY] = $messageProps[PR_SENT_REPRESENTING_SEARCH_KEY]; |
2316 | 2316 | |
2317 | 2317 | // Add organizer to recipients list. |
@@ -2498,7 +2498,7 @@ discard block |
||
2498 | 2498 | [ |
2499 | 2499 | RES_PROPERTY, |
2500 | 2500 | [ |
2501 | - RELOP => RELOP_EQ, // Equals recipient type 3: Resource |
|
2501 | + RELOP => RELOP_EQ, // Equals recipient type 3: Resource |
|
2502 | 2502 | ULPROPTAG => PR_RECIPIENT_TYPE, |
2503 | 2503 | VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC], |
2504 | 2504 | ], |
@@ -2780,7 +2780,7 @@ discard block |
||
2780 | 2780 | [ |
2781 | 2781 | RES_PROPERTY, |
2782 | 2782 | [ |
2783 | - RELOP => RELOP_EQ, // Equals recipient type 3: Resource |
|
2783 | + RELOP => RELOP_EQ, // Equals recipient type 3: Resource |
|
2784 | 2784 | ULPROPTAG => PR_RECIPIENT_TYPE, |
2785 | 2785 | VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC], |
2786 | 2786 | ], |
@@ -3012,7 +3012,7 @@ discard block |
||
3012 | 3012 | $restriction[1][] = [ |
3013 | 3013 | RES_PROPERTY, |
3014 | 3014 | [ |
3015 | - RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource) |
|
3015 | + RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource) |
|
3016 | 3016 | ULPROPTAG => PR_RECIPIENT_TYPE, |
3017 | 3017 | VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC], |
3018 | 3018 | ], |
@@ -3109,7 +3109,7 @@ discard block |
||
3109 | 3109 | [ |
3110 | 3110 | RES_PROPERTY, |
3111 | 3111 | [ |
3112 | - RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource) |
|
3112 | + RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource) |
|
3113 | 3113 | ULPROPTAG => PR_RECIPIENT_TYPE, |
3114 | 3114 | VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC], |
3115 | 3115 | ], |
@@ -3216,7 +3216,7 @@ discard block |
||
3216 | 3216 | $newmessageprops[PR_MESSAGE_CLASS] = 'IPM.Schedule.Meeting.Canceled'; |
3217 | 3217 | $newmessageprops[$this->proptags['meetingstatus']] = olMeetingCanceled; // It's a cancel request |
3218 | 3218 | $newmessageprops[$this->proptags['busystatus']] = fbFree; // set the busy status as free |
3219 | - $newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH; // HIGH Importance |
|
3219 | + $newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH; // HIGH Importance |
|
3220 | 3220 | if (isset($newmessageprops[PR_SUBJECT])) { |
3221 | 3221 | $newmessageprops[PR_SUBJECT] = _('Canceled: ') . $newmessageprops[PR_SUBJECT]; |
3222 | 3222 | } |
@@ -842,12 +842,12 @@ discard block |
||
842 | 842 | |
843 | 843 | $dayofweek = gmdate("w", $monthbegindow); |
844 | 844 | for ($i = 0; $i < 7; ++$i) { |
845 | - if ($nday == 5 && (($dayofweek - $i) % 7 >= 0) && (1 << (($dayofweek - $i) % 7)) & $weekdays) { |
|
845 | + if ($nday == 5 && (($dayofweek - $i) % 7 >= 0) && (1 << (($dayofweek - $i) % 7))&$weekdays) { |
|
846 | 846 | $day = gmdate("j", $monthbegindow) - $i; |
847 | 847 | |
848 | 848 | break; |
849 | 849 | } |
850 | - if ($nday != 5 && (1 << (($dayofweek + $i) % 7)) & $weekdays) { |
|
850 | + if ($nday != 5 && (1 << (($dayofweek + $i) % 7))&$weekdays) { |
|
851 | 851 | $day = (($nday - 1) * 7) + ($i + 1); |
852 | 852 | |
853 | 853 | break; |
@@ -887,12 +887,12 @@ discard block |
||
887 | 887 | // Set start on the right day |
888 | 888 | $dayofweek = gmdate("w", $monthbegindow); |
889 | 889 | for ($i = 0; $i < 7; ++$i) { |
890 | - if ($nday == 5 && (($dayofweek - $i) % 7) >= 0 && (1 << (($dayofweek - $i) % 7)) & $weekdays) { |
|
890 | + if ($nday == 5 && (($dayofweek - $i) % 7) >= 0 && (1 << (($dayofweek - $i) % 7))&$weekdays) { |
|
891 | 891 | $day = $i; |
892 | 892 | |
893 | 893 | break; |
894 | 894 | } |
895 | - if ($nday != 5 && (1 << (($dayofweek + $i) % 7)) & $weekdays) { |
|
895 | + if ($nday != 5 && (1 << (($dayofweek + $i) % 7))&$weekdays) { |
|
896 | 896 | $day = ($nday - 1) * 7 + ($i + 1); |
897 | 897 | |
898 | 898 | break; |
@@ -1144,12 +1144,12 @@ discard block |
||
1144 | 1144 | |
1145 | 1145 | $dayofweek = gmdate("w", $occenddate); |
1146 | 1146 | for ($i = 0; $i < 7; ++$i) { |
1147 | - if ($nday == 5 && (($dayofweek - $i) % 7) >= 0 && (1 << (($dayofweek - $i) % 7)) & $weekdays) { |
|
1147 | + if ($nday == 5 && (($dayofweek - $i) % 7) >= 0 && (1 << (($dayofweek - $i) % 7))&$weekdays) { |
|
1148 | 1148 | $occenddate -= $i * 24 * 60 * 60; |
1149 | 1149 | |
1150 | 1150 | break; |
1151 | 1151 | } |
1152 | - if ($nday != 5 && (1 << (($dayofweek + $i) % 7)) & $weekdays) { |
|
1152 | + if ($nday != 5 && (1 << (($dayofweek + $i) % 7))&$weekdays) { |
|
1153 | 1153 | $occenddate += ($i + (($nday - 1) * 7)) * 24 * 60 * 60; |
1154 | 1154 | |
1155 | 1155 | break; |
@@ -1918,7 +1918,7 @@ discard block |
||
1918 | 1918 | } |
1919 | 1919 | elseif ($this->recur['regen']) { |
1920 | 1920 | $year_starttime = $this->gmtime($now); |
1921 | - $is_next_leapyear = $this->isLeapYear($year_starttime['tm_year'] + 1900 + 1); // +1 next year |
|
1921 | + $is_next_leapyear = $this->isLeapYear($year_starttime['tm_year'] + 1900 + 1); // +1 next year |
|
1922 | 1922 | $now = $daystart + ($is_next_leapyear ? 31622400 /* Leap year in seconds */ : 31536000 /* year in seconds */); |
1923 | 1923 | |
1924 | 1924 | if ($now <= $dayend) { |
@@ -1374,8 +1374,7 @@ discard block |
||
1374 | 1374 | |
1375 | 1375 | // if the search range is set limit the result to it, otherwise return all found messages |
1376 | 1376 | $rows = (is_array($searchRange) && isset($searchRange[0], $searchRange[1])) ? |
1377 | - mapi_table_queryrows($table, [PR_ENTRYID], $searchRange[0], $searchRange[1] - $searchRange[0] + 1) : |
|
1378 | - mapi_table_queryrows($table, [PR_ENTRYID], 0, SEARCH_MAXRESULTS); |
|
1377 | + mapi_table_queryrows($table, [PR_ENTRYID], $searchRange[0], $searchRange[1] - $searchRange[0] + 1) : mapi_table_queryrows($table, [PR_ENTRYID], 0, SEARCH_MAXRESULTS); |
|
1379 | 1378 | |
1380 | 1379 | $cnt = count($rows); |
1381 | 1380 | $items['searchtotal'] = $cnt; |
@@ -1976,12 +1975,12 @@ discard block |
||
1976 | 1975 | mapi_setprops($stateMessage, [PR_DISPLAY_NAME => $messageName, PR_MESSAGE_CLASS => 'IPM.Note.GrommunioState']); |
1977 | 1976 | } |
1978 | 1977 | if (isset($stateMessage)) { |
1979 | - $jsonEncodedState = is_object($state) || is_array($state) ? json_encode($state, JSON_INVALID_UTF8_IGNORE | JSON_UNESCAPED_UNICODE) : $state; |
|
1978 | + $jsonEncodedState = is_object($state) || is_array($state) ? json_encode($state, JSON_INVALID_UTF8_IGNORE|JSON_UNESCAPED_UNICODE) : $state; |
|
1980 | 1979 | |
1981 | 1980 | $encodedState = base64_encode($jsonEncodedState); |
1982 | 1981 | $encodedStateLength = strlen($encodedState); |
1983 | 1982 | mapi_setprops($stateMessage, [PR_LAST_VERB_EXECUTED => is_int($counter) ? $counter : 0]); |
1984 | - $stream = mapi_openproperty($stateMessage, PR_BODY, IID_IStream, STGM_DIRECT, MAPI_CREATE | MAPI_MODIFY); |
|
1983 | + $stream = mapi_openproperty($stateMessage, PR_BODY, IID_IStream, STGM_DIRECT, MAPI_CREATE|MAPI_MODIFY); |
|
1985 | 1984 | mapi_stream_setsize($stream, $encodedStateLength); |
1986 | 1985 | mapi_stream_write($stream, $encodedState); |
1987 | 1986 | mapi_stream_commit($stream); |
@@ -2076,7 +2075,7 @@ discard block |
||
2076 | 2075 | private function adviseStoreToSink($store) { |
2077 | 2076 | // check if we already advised the store |
2078 | 2077 | if (!in_array($store, $this->changesSinkStores)) { |
2079 | - mapi_msgstore_advise($store, null, fnevNewMail |fnevObjectModified | fnevObjectCreated | fnevObjectMoved | fnevObjectDeleted, $this->changesSink); |
|
2078 | + mapi_msgstore_advise($store, null, fnevNewMail|fnevObjectModified|fnevObjectCreated|fnevObjectMoved|fnevObjectDeleted, $this->changesSink); |
|
2080 | 2079 | |
2081 | 2080 | if (mapi_last_hresult()) { |
2082 | 2081 | SLog::Write(LOGLEVEL_WARN, sprintf("Grommunio->adviseStoreToSink(): failed to advised store '%s' with code 0x%X. Polling will be performed.", $store, mapi_last_hresult())); |
@@ -2550,7 +2549,7 @@ discard block |
||
2550 | 2549 | $resOr, |
2551 | 2550 | [RES_CONTENT, |
2552 | 2551 | [ |
2553 | - FUZZYLEVEL => FL_SUBSTRING | FL_IGNORECASE, |
|
2552 | + FUZZYLEVEL => FL_SUBSTRING|FL_IGNORECASE, |
|
2554 | 2553 | ULPROPTAG => $property, |
2555 | 2554 | VALUE => u2w($term), |
2556 | 2555 | ], |