@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | $abHierarchyRows = mapi_table_queryallrows($hierarchyTable, [PR_AB_PROVIDER_ID, PR_ENTRYID]); |
236 | 236 | |
237 | 237 | // Look for the 'Contacts Folders' |
238 | - for ($i = 0,$len = count($abHierarchyRows); $i < $len; ++$i) { |
|
238 | + for ($i = 0, $len = count($abHierarchyRows); $i < $len; ++$i) { |
|
239 | 239 | // Check if the folder matches the Contact Provider GUID |
240 | 240 | if (MUIDZCSAB == $abHierarchyRows[$i][PR_AB_PROVIDER_ID]) { |
241 | 241 | $abContactContainerEntryid = $abHierarchyRows[$i][PR_ENTRYID]; |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $abContactContainerHierarchyRows = mapi_table_queryallrows($abContactContainerHierarchyTable, [PR_DISPLAY_NAME, PR_OBJECT_TYPE, PR_ENTRYID]); |
253 | 253 | |
254 | 254 | // Loop through all the contact folders found under the 'Contacts Folders' hierarchy |
255 | - for ($j = 0,$len = count($abContactContainerHierarchyRows); $j < $len; ++$j) { |
|
255 | + for ($j = 0, $len = count($abContactContainerHierarchyRows); $j < $len; ++$j) { |
|
256 | 256 | // Open, get contents table, restrict, sort and then merge the result in the list of $rows |
257 | 257 | $abContactFolder = mapi_ab_openentry($ab, $abContactContainerHierarchyRows[$j][PR_ENTRYID]); |
258 | 258 | $abContactFolderTable = mapi_folder_getcontentstable($abContactFolder, MAPI_DEFERRED_ERRORS); |
@@ -845,7 +845,7 @@ |
||
845 | 845 | ], |
846 | 846 | [ |
847 | 847 | RES_OR, |
848 | - $tempRestrictions, // all group restrictions |
|
848 | + $tempRestrictions, // all group restrictions |
|
849 | 849 | ], |
850 | 850 | ], |
851 | 851 | ], |
@@ -270,18 +270,18 @@ |
||
270 | 270 | $errorInfo = []; |
271 | 271 | |
272 | 272 | switch (mapi_last_hresult()) { |
273 | - case MAPI_E_NO_ACCESS: |
|
274 | - $errorInfo['error_message'] = _('Unable to perform search query, no permissions to create search folder.'); |
|
273 | + case MAPI_E_NO_ACCESS: |
|
274 | + $errorInfo['error_message'] = _('Unable to perform search query, no permissions to create search folder.'); |
|
275 | 275 | |
276 | - break; |
|
276 | + break; |
|
277 | 277 | |
278 | - case MAPI_E_NOT_FOUND: |
|
279 | - $errorInfo['error_message'] = _('Unable to perform search query, search folder not found.'); |
|
278 | + case MAPI_E_NOT_FOUND: |
|
279 | + $errorInfo['error_message'] = _('Unable to perform search query, search folder not found.'); |
|
280 | 280 | |
281 | - break; |
|
281 | + break; |
|
282 | 282 | |
283 | - default: |
|
284 | - $errorInfo['error_message'] = _('Unable to perform search query, store might not support searching.'); |
|
283 | + default: |
|
284 | + $errorInfo['error_message'] = _('Unable to perform search query, store might not support searching.'); |
|
285 | 285 | } |
286 | 286 | |
287 | 287 | $errorInfo['original_error_message'] = _('Error in creating search folder.'); |
@@ -493,12 +493,12 @@ |
||
493 | 493 | $data['search_meta']['searchfolder_entryid'] = $entryid; |
494 | 494 | $data['search_meta']['search_store_entryid'] = $action['store_entryid']; |
495 | 495 | $data['search_meta']['searchstate'] = $searchState; |
496 | - $data['search_meta']['results'] = $numberOfResults; // actual number of items that we are sending to client |
|
496 | + $data['search_meta']['results'] = $numberOfResults; // actual number of items that we are sending to client |
|
497 | 497 | |
498 | 498 | $data['page'] = []; |
499 | 499 | $data['page']['start'] = 0; |
500 | 500 | $data['page']['rowcount'] = $rowCount; |
501 | - $data['page']['totalrowcount'] = $totalRowCount; // total number of items |
|
501 | + $data['page']['totalrowcount'] = $totalRowCount; // total number of items |
|
502 | 502 | |
503 | 503 | if (!empty($listData)) { |
504 | 504 | $data['item'] = array_merge([], $listData); |
@@ -571,7 +571,7 @@ |
||
571 | 571 | ]; |
572 | 572 | |
573 | 573 | $rule[PR_RULE_NAME] = ''; |
574 | - $rule[PR_RULE_PROVIDER_DATA] = ''; // 0 byte binary string |
|
574 | + $rule[PR_RULE_PROVIDER_DATA] = ''; // 0 byte binary string |
|
575 | 575 | $rule[PR_RULE_STATE] = ST_ENABLED; |
576 | 576 | $rule[PR_RULE_LEVEL] = 0; |
577 | 577 | $rule[PR_RULE_SEQUENCE] = 0; |
@@ -319,7 +319,7 @@ |
||
319 | 319 | throw new MAPIException(null, MAPI_E_NO_ACCESS); |
320 | 320 | } |
321 | 321 | |
322 | - $noPermissionFolders = array_filter($data['item'][0]['folders']['item'], function ($item) { |
|
322 | + $noPermissionFolders = array_filter($data['item'][0]['folders']['item'], function($item) { |
|
323 | 323 | return 0 === $item['props']['access']; |
324 | 324 | }); |
325 | 325 | if (count($noPermissionFolders) >= $folders) { |
@@ -766,31 +766,31 @@ |
||
766 | 766 | |
767 | 767 | case '/': |
768 | 768 | if ('<' == $sToken) { |
769 | - $sToken .= $char; |
|
770 | - $bEndTag = true; |
|
771 | - } else { |
|
772 | - $content .= $char; |
|
773 | - } |
|
769 | + $sToken .= $char; |
|
770 | + $bEndTag = true; |
|
771 | + } else { |
|
772 | + $content .= $char; |
|
773 | + } |
|
774 | 774 | |
775 | - break; |
|
775 | + break; |
|
776 | 776 | |
777 | 777 | case '>': |
778 | 778 | if ($bEndTag) { |
779 | - $sToken .= $char; |
|
780 | - if (preg_match('/\<\/\s*style\s*\>/i', $sToken, $aMatch)) { |
|
781 | - $newpos = $i + 1; |
|
782 | - $bSucces = true; |
|
779 | + $sToken .= $char; |
|
780 | + if (preg_match('/\<\/\s*style\s*\>/i', $sToken, $aMatch)) { |
|
781 | + $newpos = $i + 1; |
|
782 | + $bSucces = true; |
|
783 | 783 | |
784 | - break 2; |
|
785 | - } |
|
786 | - $content .= $sToken; |
|
784 | + break 2; |
|
785 | + } |
|
786 | + $content .= $sToken; |
|
787 | 787 | |
788 | - $bEndTag = false; |
|
789 | - } else { |
|
790 | - $content .= $char; |
|
791 | - } |
|
788 | + $bEndTag = false; |
|
789 | + } else { |
|
790 | + $content .= $char; |
|
791 | + } |
|
792 | 792 | |
793 | - break; |
|
793 | + break; |
|
794 | 794 | |
795 | 795 | case '!': |
796 | 796 | if ('<' == $sToken) { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | if (strcspn($attvalue, "\t\r\n\0 ") !== strlen($attvalue)) { |
55 | 55 | $attvalue = str_replace( |
56 | 56 | ["\t", "\r", "\n", "\0", ' '], |
57 | - ['', '', '', '', ''], |
|
57 | + ['', '', '', '', ''], |
|
58 | 58 | $attvalue |
59 | 59 | ); |
60 | 60 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | "\xE2\x81\xBF", /* Shift JIS FULLWIDTH SUPERSCRIPT N */ |
122 | 122 | "\xCA\x9F", /* L UNICODE IPA Extension */ |
123 | 123 | "\xCA\x80", /* R UNICODE IPA Extension */ |
124 | - "\xC9\xB4", ], /* N UNICODE IPA Extension */ |
|
124 | + "\xC9\xB4", ], /* N UNICODE IPA Extension */ |
|
125 | 125 | ['l', 'l', 'r', 'r', 'n', 'n', |
126 | 126 | 'E', 'E', 'e', 'e', 'X', 'X', 'x', 'x', 'P', 'P', 'p', 'p', 'R', 'R', 'r', 'r', 'S', 'S', 's', 's', 'I', 'I', |
127 | 127 | 'i', 'i', 'O', 'O', 'o', 'o', 'N', 'N', 'n', 'n', 'L', 'L', 'l', 'l', 'U', 'U', 'u', 'u', 'n', 'n', |
@@ -755,7 +755,7 @@ discard block |
||
755 | 755 | $sToken = ''; |
756 | 756 | $bSucces = false; |
757 | 757 | $bEndTag = false; |
758 | - for ($i = $pos,$iCount = strlen($body); $i < $iCount; ++$i) { |
|
758 | + for ($i = $pos, $iCount = strlen($body); $i < $iCount; ++$i) { |
|
759 | 759 | $char = $body[$i]; |
760 | 760 | |
761 | 761 | switch ($char) { |
@@ -668,7 +668,7 @@ |
||
668 | 668 | |
669 | 669 | if ($themeProps['primary-color']) { |
670 | 670 | if (!$themeProps['primary-color:hover']) { |
671 | - list(, , $l) = Colors::rgb2hsl(Colors::colorString2Object($themeProps['primary-color'])); |
|
671 | + list(,, $l) = Colors::rgb2hsl(Colors::colorString2Object($themeProps['primary-color'])); |
|
672 | 672 | if ($l > 20) { |
673 | 673 | $themeProps['primary-color:hover'] = Colors::darker($themeProps['primary-color'], 10); |
674 | 674 | } else { |
@@ -228,14 +228,14 @@ discard block |
||
228 | 228 | $properties['reminderset'] = 'PT_BOOLEAN:PSETID_Common:0x8503'; |
229 | 229 | $properties['flag_request'] = 'PT_STRING8:PSETID_Common:0x8530'; |
230 | 230 | $properties['flag_due_by'] = 'PT_SYSTIME:PSETID_Common:0x8560'; |
231 | - $properties['updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8201'; // AppointmentSequenceNumber |
|
232 | - $properties['last_updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8203'; // AppointmentLastSequence |
|
231 | + $properties['updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8201'; // AppointmentSequenceNumber |
|
232 | + $properties['last_updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8203'; // AppointmentLastSequence |
|
233 | 233 | $properties['busystatus'] = 'PT_LONG:PSETID_Appointment:0x8205'; |
234 | 234 | $properties['intendedbusystatus'] = 'PT_LONG:PSETID_Appointment:0x8224'; |
235 | 235 | $properties['start'] = 'PT_SYSTIME:PSETID_Appointment:0x820d'; |
236 | 236 | $properties['responselocation'] = 'PT_STRING8:PSETID_Meeting:0x2'; |
237 | 237 | $properties['location'] = 'PT_STRING8:PSETID_Appointment:0x8208'; |
238 | - $properties['requestsent'] = 'PT_BOOLEAN:PSETID_Appointment:0x8229'; // PidLidFInvited, MeetingRequestWasSent |
|
238 | + $properties['requestsent'] = 'PT_BOOLEAN:PSETID_Appointment:0x8229'; // PidLidFInvited, MeetingRequestWasSent |
|
239 | 239 | $properties['startdate'] = 'PT_SYSTIME:PSETID_Appointment:0x820d'; |
240 | 240 | $properties['duedate'] = 'PT_SYSTIME:PSETID_Appointment:0x820e'; |
241 | 241 | $properties['commonstart'] = 'PT_SYSTIME:PSETID_Common:0x8516'; |
@@ -243,11 +243,11 @@ discard block |
||
243 | 243 | $properties['recurring'] = 'PT_BOOLEAN:PSETID_Appointment:0x8223'; |
244 | 244 | $properties['clipstart'] = 'PT_SYSTIME:PSETID_Appointment:0x8235'; |
245 | 245 | $properties['clipend'] = 'PT_SYSTIME:PSETID_Appointment:0x8236'; |
246 | - $properties['start_recur_date'] = 'PT_LONG:PSETID_Meeting:0xD'; // StartRecurTime |
|
247 | - $properties['start_recur_time'] = 'PT_LONG:PSETID_Meeting:0xE'; // StartRecurTime |
|
248 | - $properties['end_recur_date'] = 'PT_LONG:PSETID_Meeting:0xF'; // EndRecurDate |
|
249 | - $properties['end_recur_time'] = 'PT_LONG:PSETID_Meeting:0x10'; // EndRecurTime |
|
250 | - $properties['is_exception'] = 'PT_BOOLEAN:PSETID_Meeting:0xA'; // LID_IS_EXCEPTION |
|
246 | + $properties['start_recur_date'] = 'PT_LONG:PSETID_Meeting:0xD'; // StartRecurTime |
|
247 | + $properties['start_recur_time'] = 'PT_LONG:PSETID_Meeting:0xE'; // StartRecurTime |
|
248 | + $properties['end_recur_date'] = 'PT_LONG:PSETID_Meeting:0xF'; // EndRecurDate |
|
249 | + $properties['end_recur_time'] = 'PT_LONG:PSETID_Meeting:0x10'; // EndRecurTime |
|
250 | + $properties['is_exception'] = 'PT_BOOLEAN:PSETID_Meeting:0xA'; // LID_IS_EXCEPTION |
|
251 | 251 | // Propose new time properties |
252 | 252 | $properties['proposed_start_whole'] = 'PT_SYSTIME:PSETID_Appointment:0x8250'; |
253 | 253 | $properties['proposed_end_whole'] = 'PT_SYSTIME:PSETID_Appointment:0x8251'; |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | $properties = []; |
621 | 621 | $properties['entryid'] = PR_ENTRYID; |
622 | 622 | $properties['parent_entryid'] = PR_PARENT_ENTRYID; |
623 | - $properties['store_entryid'] = PR_STORE_ENTRYID; // is this required ??? |
|
623 | + $properties['store_entryid'] = PR_STORE_ENTRYID; // is this required ??? |
|
624 | 624 | $properties['icon_index'] = PR_ICON_INDEX; |
625 | 625 | $properties['message_class'] = PR_MESSAGE_CLASS; |
626 | 626 | $properties['message_flags'] = PR_MESSAGE_FLAGS; |
@@ -936,9 +936,9 @@ discard block |
||
936 | 936 | $properties['appointment_location'] = 'PT_STRING8:PSETID_Appointment:0x8208'; |
937 | 937 | $properties['appointment_recurring_pattern'] = 'PT_STRING8:PSETID_Appointment:0x8232'; |
938 | 938 | $properties['appointment_recurring'] = 'PT_BOOLEAN:PSETID_Appointment:0x8223'; |
939 | - $properties['appointment_startdate_recurring'] = 'PT_SYSTIME:PSETID_Appointment:0x8235'; // ClipStart |
|
940 | - $properties['appointment_enddate_recurring'] = 'PT_SYSTIME:PSETID_Appointment:0x8236'; // ClipEnd |
|
941 | - $properties['appointment_exception'] = 'PT_BOOLEAN:PSETID_Meeting:0xA'; // LID_IS_EXCEPTION |
|
939 | + $properties['appointment_startdate_recurring'] = 'PT_SYSTIME:PSETID_Appointment:0x8235'; // ClipStart |
|
940 | + $properties['appointment_enddate_recurring'] = 'PT_SYSTIME:PSETID_Appointment:0x8236'; // ClipEnd |
|
941 | + $properties['appointment_exception'] = 'PT_BOOLEAN:PSETID_Meeting:0xA'; // LID_IS_EXCEPTION |
|
942 | 942 | $properties['appointment_location'] = 'PT_STRING8:PSETID_Appointment:0x8208'; |
943 | 943 | // Propose new time properties |
944 | 944 | $properties['proposed_start_date'] = 'PT_SYSTIME:PSETID_Appointment:0x8250'; |
@@ -1224,18 +1224,18 @@ discard block |
||
1224 | 1224 | $properties['subject'] = PR_SUBJECT; |
1225 | 1225 | $properties['object_type'] = PR_OBJECT_TYPE; |
1226 | 1226 | |
1227 | - $properties['reminder'] = 'PT_BOOLEAN:PSETID_Common:0x8503'; // PidLidReminderSet |
|
1228 | - $properties['reminder_minutes'] = 'PT_LONG:PSETID_Common:0x8501'; // PidLidReminderDelta |
|
1229 | - $properties['reminder_time'] = 'PT_SYSTIME:PSETID_Common:0x8502'; // PidLidReminderTime |
|
1230 | - $properties['flagdueby'] = 'PT_SYSTIME:PSETID_Common:0x8560'; // PidLidReminderSignalTime |
|
1227 | + $properties['reminder'] = 'PT_BOOLEAN:PSETID_Common:0x8503'; // PidLidReminderSet |
|
1228 | + $properties['reminder_minutes'] = 'PT_LONG:PSETID_Common:0x8501'; // PidLidReminderDelta |
|
1229 | + $properties['reminder_time'] = 'PT_SYSTIME:PSETID_Common:0x8502'; // PidLidReminderTime |
|
1230 | + $properties['flagdueby'] = 'PT_SYSTIME:PSETID_Common:0x8560'; // PidLidReminderSignalTime |
|
1231 | 1231 | |
1232 | - $properties['task_duedate'] = 'PT_SYSTIME:PSETID_Task:0x8105'; // PidLidTaskDueDate |
|
1233 | - $properties['task_startdate'] = 'PT_SYSTIME:PSETID_Task:0x8104'; // PidLidTaskStartDate |
|
1234 | - $properties['task_resetreminder'] = 'PT_BOOLEAN:PSETID_Task:0x8107'; // PidLidTaskResetReminder |
|
1235 | - $properties['task_recurring'] = 'PT_BOOLEAN:PSETID_Task:0x8126'; // PidLidTaskFRecurring |
|
1232 | + $properties['task_duedate'] = 'PT_SYSTIME:PSETID_Task:0x8105'; // PidLidTaskDueDate |
|
1233 | + $properties['task_startdate'] = 'PT_SYSTIME:PSETID_Task:0x8104'; // PidLidTaskStartDate |
|
1234 | + $properties['task_resetreminder'] = 'PT_BOOLEAN:PSETID_Task:0x8107'; // PidLidTaskResetReminder |
|
1235 | + $properties['task_recurring'] = 'PT_BOOLEAN:PSETID_Task:0x8126'; // PidLidTaskFRecurring |
|
1236 | 1236 | $properties['taskmode'] = 'PT_LONG:PSETID_Common:0x8518'; |
1237 | 1237 | |
1238 | - $properties['appointment_recurring'] = 'PT_BOOLEAN:PSETID_Appointment:0x8223'; // PidLidRecurring |
|
1238 | + $properties['appointment_recurring'] = 'PT_BOOLEAN:PSETID_Appointment:0x8223'; // PidLidRecurring |
|
1239 | 1239 | $properties['appointment_startdate'] = 'PT_SYSTIME:PSETID_Appointment:0x820d'; |
1240 | 1240 | $properties['appointment_enddate'] = 'PT_SYSTIME:PSETID_Appointment:0x820e'; |
1241 | 1241 | $properties['appointment_startdate_recurring'] = 'PT_SYSTIME:PSETID_Appointment:0x8235'; |
@@ -717,14 +717,14 @@ |
||
717 | 717 | $this->userstores[$name] = $entryid; |
718 | 718 | } catch (MAPIException $e) { |
719 | 719 | error_log('Failed to open store. ' . $this->session_info['username'] . |
720 | - ' requested ' . bin2hex($entryid) . ($name ? " ({$name})" : '')); |
|
720 | + ' requested ' . bin2hex($entryid) . ($name ? " ({$name})" : '')); |
|
721 | 721 | |
722 | 722 | return $e->getCode(); |
723 | 723 | } catch (Exception $e) { |
724 | 724 | // mapi_openmsgstore seems to throw another exception than MAPIException |
725 | 725 | // sometimes, so we add a safety net. |
726 | 726 | error_log('Failed to open store. ' . $this->session_info['username'] . |
727 | - ' requested ' . bin2hex($entryid) . ($name ? " ({$name})" : '')); |
|
727 | + ' requested ' . bin2hex($entryid) . ($name ? " ({$name})" : '')); |
|
728 | 728 | |
729 | 729 | return $e->getCode(); |
730 | 730 | } |
@@ -1046,7 +1046,7 @@ discard block |
||
1046 | 1046 | // Postfix display name of every contact folder with respective owner name |
1047 | 1047 | // it is mandatory to keep display-name different |
1048 | 1048 | $userStoreProps = mapi_getprops($openedUserStore, [PR_MAILBOX_OWNER_NAME]); |
1049 | - for ($i = 0,$len = count($userContactFolders); $i < $len; ++$i) { |
|
1049 | + for ($i = 0, $len = count($userContactFolders); $i < $len; ++$i) { |
|
1050 | 1050 | $userContactFolders[$i][PR_DISPLAY_NAME] = $userContactFolders[$i][PR_DISPLAY_NAME] . ' - ' . $userStoreProps[PR_MAILBOX_OWNER_NAME]; |
1051 | 1051 | } |
1052 | 1052 | |
@@ -1070,7 +1070,7 @@ discard block |
||
1070 | 1070 | |
1071 | 1071 | // Create the lists of store entryids, folder entryids and folder names to be added |
1072 | 1072 | // to the profile section |
1073 | - for ($i = 0,$len = count($contactFolders); $i < $len; ++$i) { |
|
1073 | + for ($i = 0, $len = count($contactFolders); $i < $len; ++$i) { |
|
1074 | 1074 | $contact_store_entryids[] = $contactFolders[$i][PR_STORE_ENTRYID]; |
1075 | 1075 | $contact_folder_entryids[] = $contactFolders[$i][PR_ENTRYID]; |
1076 | 1076 | $contact_folder_names[] = $contactFolders[$i][PR_DISPLAY_NAME]; |