@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | throw new MAPIException(null, MAPI_E_NO_ACCESS); |
317 | 317 | } |
318 | 318 | |
319 | - $noPermissionFolders = array_filter($data['item'][0]['folders']['item'], function ($item) { |
|
319 | + $noPermissionFolders = array_filter($data['item'][0]['folders']['item'], function($item) { |
|
320 | 320 | return $item['props']['access'] === 0; |
321 | 321 | }); |
322 | 322 | if (count($noPermissionFolders) >= $folders) { |
@@ -685,7 +685,7 @@ discard block |
||
685 | 685 | if (isset($action["permissions"])) { |
686 | 686 | $this->setFolderPermissions($folder, $action["permissions"]); |
687 | 687 | if (isset($action['props']['recursive'])) { |
688 | - $hierarchyTable = mapi_folder_gethierarchytable($folder, CONVENIENT_DEPTH | MAPI_DEFERRED_ERRORS); |
|
688 | + $hierarchyTable = mapi_folder_gethierarchytable($folder, CONVENIENT_DEPTH|MAPI_DEFERRED_ERRORS); |
|
689 | 689 | $subfolders = mapi_table_queryallrows($hierarchyTable, [PR_ENTRYID]); |
690 | 690 | foreach ($subfolders as $subfolder) { |
691 | 691 | $folderObject = mapi_msgstore_openentry($store, $subfolder[PR_ENTRYID]); |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | foreach ($curAcls as $aclIndex => &$curAcl) { |
758 | 758 | if ($curAcl['userid'] === $userid) { |
759 | 759 | $curAcl['rights'] = ecRightsNone; |
760 | - $curAcl['state'] = RIGHT_DELETED | RIGHT_AUTOUPDATE_DENIED; |
|
760 | + $curAcl['state'] = RIGHT_DELETED|RIGHT_AUTOUPDATE_DENIED; |
|
761 | 761 | } |
762 | 762 | } |
763 | 763 | unset($curAcl); |
@@ -784,7 +784,7 @@ discard block |
||
784 | 784 | foreach ($curAcls as $aclIndex => &$curAcl) { |
785 | 785 | if ($curAcl['userid'] === $userid) { |
786 | 786 | $curAcl['rights'] = $modAcl['rights']; |
787 | - $curAcl['state'] = RIGHT_MODIFY | RIGHT_AUTOUPDATE_DENIED; |
|
787 | + $curAcl['state'] = RIGHT_MODIFY|RIGHT_AUTOUPDATE_DENIED; |
|
788 | 788 | } |
789 | 789 | } |
790 | 790 | } |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | 'type' => ACCESS_TYPE_GRANT, |
801 | 801 | 'userid' => hex2bin($addAcl['entryid']), |
802 | 802 | 'rights' => $addAcl['rights'], |
803 | - 'state' => RIGHT_NEW | RIGHT_AUTOUPDATE_DENIED, |
|
803 | + 'state' => RIGHT_NEW|RIGHT_AUTOUPDATE_DENIED, |
|
804 | 804 | ]; |
805 | 805 | } |
806 | 806 | unset($addAcl); |
@@ -1032,7 +1032,7 @@ discard block |
||
1032 | 1032 | if (!isset($action["message_action"]["keepSearchFolder"])) { |
1033 | 1033 | $finderFolder = mapi_msgstore_openentry($store, $parententryid); |
1034 | 1034 | |
1035 | - return mapi_folder_deletefolder($finderFolder, $entryid, DEL_FOLDERS | DEL_MESSAGES | DELETE_HARD_DELETE); |
|
1035 | + return mapi_folder_deletefolder($finderFolder, $entryid, DEL_FOLDERS|DEL_MESSAGES|DELETE_HARD_DELETE); |
|
1036 | 1036 | } |
1037 | 1037 | // Rename search folder to default search folder name otherwise, |
1038 | 1038 | // It will not be picked up by our search folder cleanup logic. |
@@ -1258,7 +1258,7 @@ discard block |
||
1258 | 1258 | |
1259 | 1259 | // Update subfolders of copy/move folder |
1260 | 1260 | $folder = mapi_msgstore_openentry($deststore, $destfolderentryid); |
1261 | - $hierarchyTable = mapi_folder_gethierarchytable($folder, CONVENIENT_DEPTH | MAPI_DEFERRED_ERRORS); |
|
1261 | + $hierarchyTable = mapi_folder_gethierarchytable($folder, CONVENIENT_DEPTH|MAPI_DEFERRED_ERRORS); |
|
1262 | 1262 | mapi_table_sort($hierarchyTable, [PR_DISPLAY_NAME => TABLE_SORT_ASCEND], TBL_BATCH); |
1263 | 1263 | |
1264 | 1264 | /** |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | public function getRestriction() { |
123 | 123 | return [RES_CONTENT, |
124 | 124 | [ |
125 | - FUZZYLEVEL => FL_PREFIX | FL_IGNORECASE, |
|
125 | + FUZZYLEVEL => FL_PREFIX|FL_IGNORECASE, |
|
126 | 126 | ULPROPTAG => PR_RULE_PROVIDER, |
127 | 127 | VALUE => [ |
128 | 128 | PR_RULE_PROVIDER => 'RuleOrganizer', |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | $associatedTable, |
279 | 279 | [RES_CONTENT, |
280 | 280 | [ |
281 | - FUZZYLEVEL => FL_FULLSTRING | FL_IGNORECASE, |
|
281 | + FUZZYLEVEL => FL_FULLSTRING|FL_IGNORECASE, |
|
282 | 282 | ULPROPTAG => PR_MESSAGE_CLASS, |
283 | 283 | VALUE => [ |
284 | 284 | PR_MESSAGE_CLASS => "IPM.RuleOrganizer", |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | // Write new recipient history to property |
100 | 100 | $l_sNewRecipientHistoryJSON = json_encode($recipient_history); |
101 | 101 | |
102 | - $stream = mapi_openproperty($GLOBALS["mapisession"]->getDefaultMessageStore(), PR_EC_RECIPIENT_HISTORY_JSON, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY); |
|
102 | + $stream = mapi_openproperty($GLOBALS["mapisession"]->getDefaultMessageStore(), PR_EC_RECIPIENT_HISTORY_JSON, IID_IStream, 0, MAPI_CREATE|MAPI_MODIFY); |
|
103 | 103 | mapi_stream_setsize($stream, strlen($l_sNewRecipientHistoryJSON)); |
104 | 104 | mapi_stream_write($stream, $l_sNewRecipientHistoryJSON); |
105 | 105 | mapi_stream_commit($stream); |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | if (!empty($action["query"]) && !empty($recipient_history) && !empty($recipient_history['recipients'])) { |
123 | 123 | // Setup result array with match levels |
124 | 124 | $l_aResult = [ |
125 | - 0 => [], // Matches on whole string |
|
126 | - 1 => [], // Matches on part of string |
|
125 | + 0 => [], // Matches on whole string |
|
126 | + 1 => [], // Matches on part of string |
|
127 | 127 | ]; |
128 | 128 | |
129 | 129 | // Loop through all the recipients |
@@ -496,12 +496,12 @@ discard block |
||
496 | 496 | $data["search_meta"]["searchfolder_entryid"] = $entryid; |
497 | 497 | $data["search_meta"]["search_store_entryid"] = $action["store_entryid"]; |
498 | 498 | $data["search_meta"]["searchstate"] = $searchState; |
499 | - $data["search_meta"]["results"] = $numberOfResults; // actual number of items that we are sending to client |
|
499 | + $data["search_meta"]["results"] = $numberOfResults; // actual number of items that we are sending to client |
|
500 | 500 | |
501 | 501 | $data["page"] = []; |
502 | 502 | $data["page"]["start"] = 0; |
503 | 503 | $data["page"]["rowcount"] = $rowCount; |
504 | - $data["page"]["totalrowcount"] = $totalRowCount; // total number of items |
|
504 | + $data["page"]["totalrowcount"] = $totalRowCount; // total number of items |
|
505 | 505 | |
506 | 506 | if (!empty($listData)) { |
507 | 507 | $data["item"] = array_merge([], $listData); |
@@ -651,7 +651,7 @@ discard block |
||
651 | 651 | $rows = mapi_table_queryrows($table, [PR_DISPLAY_NAME, PR_ENTRYID], 0, 0xFFFF); |
652 | 652 | foreach ($rows as $row) { |
653 | 653 | if (strcasecmp($folderName, $row[PR_DISPLAY_NAME]) == 0) { |
654 | - mapi_folder_deletefolder($searchFolderRoot, $row[PR_ENTRYID], DEL_FOLDERS | DEL_MESSAGES); |
|
654 | + mapi_folder_deletefolder($searchFolderRoot, $row[PR_ENTRYID], DEL_FOLDERS|DEL_MESSAGES); |
|
655 | 655 | break; |
656 | 656 | } |
657 | 657 | } |
@@ -781,8 +781,8 @@ discard block |
||
781 | 781 | // Otherwise the server would generate multiple rows for one item (categories). |
782 | 782 | foreach ($properties as $id => $property) { |
783 | 783 | switch (mapi_prop_type($property)) { |
784 | - case PT_MV_STRING8 | MVI_FLAG: |
|
785 | - case PT_MV_LONG | MVI_FLAG: |
|
784 | + case PT_MV_STRING8|MVI_FLAG: |
|
785 | + case PT_MV_LONG|MVI_FLAG: |
|
786 | 786 | $properties[$id] = $properties[$id] & ~MV_INSTANCE; |
787 | 787 | break; |
788 | 788 | } |
@@ -806,7 +806,7 @@ discard block |
||
806 | 806 | // Set MVI_FLAG. |
807 | 807 | // The server will generate multiple rows for one item (for example: categories) |
808 | 808 | if ($allow_multi_instance) { |
809 | - $properties[$column["field"]] = $properties[$column["field"]] | MVI_FLAG; |
|
809 | + $properties[$column["field"]] = $properties[$column["field"]]|MVI_FLAG; |
|
810 | 810 | } |
811 | 811 | $property = $properties[$column["field"]]; |
812 | 812 | break; |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | elseif ($type == RES_BITMASK) { |
204 | 204 | $subres = $restriction[1]; |
205 | 205 | if ($subres[ULPROPTAG] == PR_MESSAGE_FLAGS && $subres[ULTYPE] == BMR_EQZ) { |
206 | - if (MSGFLAG_READ & $subres[ULMASK]) { |
|
206 | + if (MSGFLAG_READ&$subres[ULMASK]) { |
|
207 | 207 | $patterns['unread'] = true; |
208 | 208 | } |
209 | 209 | } |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | } |
344 | 344 | } |
345 | 345 | // we never start the search folder because we will populate the search folder by ourselves |
346 | - mapi_folder_setsearchcriteria($searchFolder, $this->restriction, $entryids, $subfolder_flag | STOP_SEARCH); |
|
346 | + mapi_folder_setsearchcriteria($searchFolder, $this->restriction, $entryids, $subfolder_flag|STOP_SEARCH); |
|
347 | 347 | $this->sessionData['searchCriteriaCheck'] = $restrictionCheck; |
348 | 348 | } |
349 | 349 | |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | if ($this->sessionData['searchOriginalEntryids'][0] !== $folderEntryid) { |
353 | 353 | $this->sessionData['searchOriginalEntryids'][0] = $folderEntryid; |
354 | 354 | // we never start the search folder because we will populate the search folder by ourselves |
355 | - mapi_folder_setsearchcriteria($searchFolder, $this->restriction, [$entryid], $subfolder_flag | STOP_SEARCH); |
|
355 | + mapi_folder_setsearchcriteria($searchFolder, $this->restriction, [$entryid], $subfolder_flag|STOP_SEARCH); |
|
356 | 356 | } |
357 | 357 | } |
358 | 358 |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | // get delegate meeting rule |
326 | 326 | $restriction = [RES_CONTENT, |
327 | 327 | [ |
328 | - FUZZYLEVEL => FL_FULLSTRING | FL_IGNORECASE, |
|
328 | + FUZZYLEVEL => FL_FULLSTRING|FL_IGNORECASE, |
|
329 | 329 | ULPROPTAG => PR_RULE_PROVIDER, |
330 | 330 | VALUE => [ |
331 | 331 | PR_RULE_PROVIDER => 'Schedule+ EMS Interface', |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | 'type' => ACCESS_TYPE_GRANT, |
446 | 446 | 'userid' => hex2bin($delegate['entryid']), |
447 | 447 | 'rights' => $delegate['props']['rights_' . $folderName], |
448 | - 'state' => RIGHT_NEW | RIGHT_AUTOUPDATE_DENIED, |
|
448 | + 'state' => RIGHT_NEW|RIGHT_AUTOUPDATE_DENIED, |
|
449 | 449 | ], |
450 | 450 | ]; |
451 | 451 | |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | ]; |
576 | 576 | |
577 | 577 | $rule[PR_RULE_NAME] = ''; |
578 | - $rule[PR_RULE_PROVIDER_DATA] = ''; // 0 byte binary string |
|
578 | + $rule[PR_RULE_PROVIDER_DATA] = ''; // 0 byte binary string |
|
579 | 579 | $rule[PR_RULE_STATE] = ST_ENABLED; |
580 | 580 | $rule[PR_RULE_LEVEL] = 0; |
581 | 581 | $rule[PR_RULE_SEQUENCE] = 0; |
@@ -700,7 +700,7 @@ discard block |
||
700 | 700 | 'type' => ACCESS_TYPE_GRANT, |
701 | 701 | 'userid' => hex2bin($delegate['entryid']), |
702 | 702 | 'rights' => ecRightsNone, |
703 | - 'state' => RIGHT_DELETED | RIGHT_AUTOUPDATE_DENIED, |
|
703 | + 'state' => RIGHT_DELETED|RIGHT_AUTOUPDATE_DENIED, |
|
704 | 704 | ], |
705 | 705 | ]; |
706 | 706 |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $abHierarchyRows = mapi_table_queryallrows($hierarchyTable, [PR_AB_PROVIDER_ID, PR_ENTRYID]); |
243 | 243 | |
244 | 244 | // Look for the 'Contacts Folders' |
245 | - for ($i = 0,$len = count($abHierarchyRows); $i < $len; ++$i) { |
|
245 | + for ($i = 0, $len = count($abHierarchyRows); $i < $len; ++$i) { |
|
246 | 246 | // Check if the folder matches the Contact Provider GUID |
247 | 247 | if ($abHierarchyRows[$i][PR_AB_PROVIDER_ID] == MUIDZCSAB) { |
248 | 248 | $abContactContainerEntryid = $abHierarchyRows[$i][PR_ENTRYID]; |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $abContactContainerHierarchyRows = mapi_table_queryallrows($abContactContainerHierarchyTable, [PR_DISPLAY_NAME, PR_OBJECT_TYPE, PR_ENTRYID]); |
259 | 259 | |
260 | 260 | // Loop through all the contact folders found under the 'Contacts Folders' hierarchy |
261 | - for ($j = 0,$len = count($abContactContainerHierarchyRows); $j < $len; ++$j) { |
|
261 | + for ($j = 0, $len = count($abContactContainerHierarchyRows); $j < $len; ++$j) { |
|
262 | 262 | // Open, get contents table, restrict, sort and then merge the result in the list of $rows |
263 | 263 | $abContactFolder = mapi_ab_openentry($ab, $abContactContainerHierarchyRows[$j][PR_ENTRYID]); |
264 | 264 | $abContactFolderTable = mapi_folder_getcontentstable($abContactFolder, MAPI_DEFERRED_ERRORS); |
@@ -289,14 +289,14 @@ discard block |
||
289 | 289 | [ |
290 | 290 | [RES_CONTENT, |
291 | 291 | [ |
292 | - FUZZYLEVEL => FL_PREFIX | FL_IGNORECASE, |
|
292 | + FUZZYLEVEL => FL_PREFIX|FL_IGNORECASE, |
|
293 | 293 | ULPROPTAG => PR_DISPLAY_NAME, |
294 | 294 | VALUE => $query, |
295 | 295 | ], |
296 | 296 | ], |
297 | 297 | [RES_CONTENT, |
298 | 298 | [ |
299 | - FUZZYLEVEL => FL_PREFIX | FL_IGNORECASE, |
|
299 | + FUZZYLEVEL => FL_PREFIX|FL_IGNORECASE, |
|
300 | 300 | ULPROPTAG => $content, |
301 | 301 | VALUE => $query, |
302 | 302 | ], |
@@ -35,7 +35,7 @@ |
||
35 | 35 | * OBJECT_SAVE, OBJECT_DELETE, TABLE_SAVE, TABLE_DELETE, REQUEST_START and REQUEST_END flags |
36 | 36 | */ |
37 | 37 | public function getEvents() { |
38 | - return OBJECT_SAVE | OBJECT_DELETE | TABLE_SAVE | TABLE_DELETE | REQUEST_START | REQUEST_END; |
|
38 | + return OBJECT_SAVE|OBJECT_DELETE|TABLE_SAVE|TABLE_DELETE|REQUEST_START|REQUEST_END; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -13,7 +13,7 @@ |
||
13 | 13 | * OBJECT_SAVE, OBJECT_DELETE, TABLE_SAVE, TABLE_DELETE, REQUEST_START and REQUEST_END flags |
14 | 14 | */ |
15 | 15 | public function getEvents() { |
16 | - return OBJECT_SAVE | TABLE_SAVE | TABLE_DELETE; |
|
16 | + return OBJECT_SAVE|TABLE_SAVE|TABLE_DELETE; |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | /** |