Passed
Branch master (ff9d34)
by Mike
09:14
created
mapi/class.taskrequest.php 2 patches
Spacing   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
      * carried in the IPM.TaskRequest item (although this information seems
24 24
      * redundant due to that information already being available in PR_MESSAGE_CLASS).
25 25
      */
26
-    define('tdmtNothing', 0);            // Value in IPM.Task items
27
-    define('tdmtTaskReq', 1);            // Assigner -> Assignee
28
-    define('tdmtTaskAcc', 2);            // Assignee -> Assigner
29
-    define('tdmtTaskDec', 3);            // Assignee -> Assigner
30
-    define('tdmtTaskUpd', 4);            // Assignee -> Assigner
31
-    define('tdmtTaskSELF', 5);            // Assigner -> Assigner (?)
26
+    define('tdmtNothing', 0); // Value in IPM.Task items
27
+    define('tdmtTaskReq', 1); // Assigner -> Assignee
28
+    define('tdmtTaskAcc', 2); // Assignee -> Assigner
29
+    define('tdmtTaskDec', 3); // Assignee -> Assigner
30
+    define('tdmtTaskUpd', 4); // Assignee -> Assigner
31
+    define('tdmtTaskSELF', 5); // Assigner -> Assigner (?)
32 32
 
33 33
     /* The TaskHistory is used to show the last action on the task
34 34
      * on both the assigner and the assignee's side.
@@ -38,22 +38,22 @@  discard block
 block discarded – undo
38 38
      * the format 'Accepted by <user> on 01-01-2010 11:00'.
39 39
      */
40 40
     define('thNone', 0);
41
-    define('thAccepted', 1);            // Set by assignee
42
-    define('thDeclined', 2);            // Set by assignee
43
-    define('thUpdated', 3);                // Set by assignee
41
+    define('thAccepted', 1); // Set by assignee
42
+    define('thDeclined', 2); // Set by assignee
43
+    define('thUpdated', 3); // Set by assignee
44 44
     define('thDueDateChanged', 4);
45
-    define('thAssigned', 5);            // Set by assigner
45
+    define('thAssigned', 5); // Set by assigner
46 46
 
47 47
     /* The TaskState value is used to differentiate the version of a task
48 48
      * in the assigner's folder and the version in the
49 49
      * assignee's folder. The buttons shown depend on this and
50 50
      * the 'taskaccepted' boolean (for the assignee)
51 51
      */
52
-    define('tdsNOM', 0);        // Got a response to a deleted task, and re-created the task for the assigner
53
-    define('tdsOWNNEW', 1);        // Not assigned
54
-    define('tdsOWN', 2);        // Assignee version
55
-    define('tdsACC', 3);        // Assigner version
56
-    define('tdsDEC', 4);        // Assigner version, but assignee declined
52
+    define('tdsNOM', 0); // Got a response to a deleted task, and re-created the task for the assigner
53
+    define('tdsOWNNEW', 1); // Not assigned
54
+    define('tdsOWN', 2); // Assignee version
55
+    define('tdsACC', 3); // Assigner version
56
+    define('tdsDEC', 4); // Assigner version, but assignee declined
57 57
 
58 58
     /* The TaskAcceptanceState is used for the assigner to indicate state */
59 59
     define('olTaskNotDelegated', 0);
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 
64 64
     /* The task ownership indicates the role of the current user relative to the task. */
65 65
     define('olNewTask', 0);
66
-    define('olDelegatedTask', 1);    // Task has been assigned
67
-    define('olOwnTask', 2);            // Task owned
66
+    define('olDelegatedTask', 1); // Task has been assigned
67
+    define('olOwnTask', 2); // Task owned
68 68
 
69 69
     /* taskmultrecips indicates whether the task request sent or received has multiple assignees or not. */
70 70
     define('tmrNone', 0);
71
-    define('tmrSent', 1);        // Task has been sent to multiple assignee
72
-    define('tmrReceived', 2);    // Task Request received has multiple assignee
71
+    define('tmrSent', 1); // Task has been sent to multiple assignee
72
+    define('tmrReceived', 2); // Task Request received has multiple assignee
73 73
 
74 74
     //Task icon index.
75 75
     define('ICON_TASK_ASSIGNEE', 0x00000502);
@@ -165,12 +165,12 @@  discard block
 block discarded – undo
165 165
          */
166 166
         function isTaskRequest($messageClass = false)
167 167
         {
168
-            if($messageClass === false) {
168
+            if ($messageClass === false) {
169 169
                 $props = mapi_getprops($this->message, Array(PR_MESSAGE_CLASS));
170 170
                 $messageClass = isset($props[PR_MESSAGE_CLASS]) ? $props[PR_MESSAGE_CLASS] : false;
171 171
             }
172 172
 
173
-            if($messageClass !== false &&  $messageClass === "IPM.TaskRequest") {
173
+            if ($messageClass !== false && $messageClass === "IPM.TaskRequest") {
174 174
                 return true;
175 175
             }
176 176
 
@@ -184,12 +184,12 @@  discard block
 block discarded – undo
184 184
          */
185 185
         function isTaskRequestResponse($messageClass = false)
186 186
         {
187
-            if($messageClass === false) {
187
+            if ($messageClass === false) {
188 188
                 $props = mapi_getprops($this->message, Array(PR_MESSAGE_CLASS));
189 189
                 $messageClass = isset($props[PR_MESSAGE_CLASS]) ? $props[PR_MESSAGE_CLASS] : false;
190 190
             }
191 191
 
192
-            if($messageClass !== false &&  strpos($messageClass, "IPM.TaskRequest.") === 0) {
192
+            if ($messageClass !== false && strpos($messageClass, "IPM.TaskRequest.") === 0) {
193 193
                 return true;
194 194
             }
195 195
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
         {
223 223
             $props = mapi_getprops($this->message, array(PR_MESSAGE_CLASS, $this->props['task_goid']));
224 224
 
225
-            if($props[PR_MESSAGE_CLASS] == "IPM.Task") {
225
+            if ($props[PR_MESSAGE_CLASS] == "IPM.Task") {
226 226
                 // Message itself is task, so return that
227 227
                 return $this->message;
228 228
             }
@@ -240,9 +240,9 @@  discard block
 block discarded – undo
240 240
 
241 241
             $rows = mapi_table_queryallrows($contents, array(PR_ENTRYID), $restriction);
242 242
 
243
-            if(empty($rows)) {
243
+            if (empty($rows)) {
244 244
                 // None found, create one if possible
245
-                if(!$create) {
245
+                if (!$create) {
246 246
                     return false;
247 247
                 }
248 248
 
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
             $result = false;
289 289
             $associatedTask = $this->getAssociatedTask(false);
290 290
             if ($this->isTaskRequest($props[PR_MESSAGE_CLASS])) {
291
-                if($associatedTask) {
291
+                if ($associatedTask) {
292 292
                     return true;
293 293
                 } else {
294 294
                     $folder = $this->getDefaultTasksFolder();
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                         VALUE => $goid)
301 301
                     );
302 302
 
303
-                    $table = mapi_folder_getcontentstable($folder, MAPI_DEFERRED_ERRORS | SHOW_SOFT_DELETES);
303
+                    $table = mapi_folder_getcontentstable($folder, MAPI_DEFERRED_ERRORS|SHOW_SOFT_DELETES);
304 304
                     $softDeletedItems = mapi_table_queryallrows($table, array(PR_ENTRYID), $restriction);
305 305
                     if (!empty($softDeletedItems)) {
306 306
                         return true;
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
                  * if(message_counter >= task_counter) task is not updated, do normal processing
316 316
                  */
317 317
                 if (isset($taskItemProps[$this->props['updatecount']], $props[$this->props['updatecount']])) {
318
-                    if($props[$this->props['updatecount']] < $taskItemProps[$this->props['updatecount']]) {
318
+                    if ($props[$this->props['updatecount']] < $taskItemProps[$this->props['updatecount']]) {
319 319
                         $result = true;
320 320
                     }
321 321
                 }
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 
346 346
             // If task is updated in task folder then we don't need to process
347 347
             // old response
348
-            if($this->isTaskRequestUpdated()) {
348
+            if ($this->isTaskRequestUpdated()) {
349 349
                 return true;
350 350
             }
351 351
 
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
                     break;
380 380
             }
381 381
 
382
-            $props =  array($this->props['taskhistory'] => $taskHistory,
382
+            $props = array($this->props['taskhistory'] => $taskHistory,
383 383
                 $this->props['taskstate'] => $taskState,
384 384
                 $this->props['task_acceptance_state'] => $taskAcceptanceState,
385 385
                 $this->props['ownership'] => $taskOwner);
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
                 // all attachments from associated task.
392 392
                 $taskAttachTable = mapi_message_getattachmenttable($task);
393 393
                 $taskAttachments = mapi_table_queryallrows($taskAttachTable, array(PR_ATTACH_NUM));
394
-                foreach($taskAttachments as $taskAttach) {
394
+                foreach ($taskAttachments as $taskAttach) {
395 395
                     mapi_message_deleteattach($task, $taskAttach[PR_ATTACH_NUM]);
396 396
                 }
397 397
 
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
                 mapi_setprops($task, $senderProps);
427 427
 
428 428
                 // Update taskstate and task history (last action done by the assignee)
429
-                mapi_setprops($task,$props);
429
+                mapi_setprops($task, $props);
430 430
 
431 431
                 mapi_savechanges($task);
432 432
             }
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
             mapi_setprops($this->message, $props);
435 435
             mapi_savechanges($this->message);
436 436
 
437
-            if($isReceivedItem) {
437
+            if ($isReceivedItem) {
438 438
                 $this->updateSentTaskRequest();
439 439
             }
440 440
             return true;
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
             $storeProps = mapi_getprops($store, array(PR_IPM_SENTMAIL_ENTRYID));
459 459
 
460 460
             $sentFolder = mapi_msgstore_openentry($store, $storeProps[PR_IPM_SENTMAIL_ENTRYID]);
461
-            if(!$sentFolder) {
461
+            if (!$sentFolder) {
462 462
                 return false;
463 463
             }
464 464
 
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
 
473 473
             $rows = mapi_table_queryallrows($contentsTable, array(PR_ENTRYID), $restriction);
474 474
 
475
-            if(!empty($rows)) {
475
+            if (!empty($rows)) {
476 476
                 foreach ($rows as $row) {
477 477
                     $sentTaskRequest = mapi_msgstore_openentry($store, $row[PR_ENTRYID]);
478 478
                     mapi_setprops($sentTaskRequest, $props);
@@ -496,12 +496,12 @@  discard block
 block discarded – undo
496 496
             // Set properties on Task Request
497 497
             mapi_setprops($this->message, array(
498 498
                 $this->props['task_goid'] => $taskid, /* our new task_goid */
499
-                $this->props['taskstate'] => tdsACC,         /* state for our outgoing request */
500
-                $this->props['taskmode'] => tdmtNothing,     /* we're not sending a change */
501
-                $this->props['updatecount'] => 2,            /* version 2 (no idea) */
499
+                $this->props['taskstate'] => tdsACC, /* state for our outgoing request */
500
+                $this->props['taskmode'] => tdmtNothing, /* we're not sending a change */
501
+                $this->props['updatecount'] => 2, /* version 2 (no idea) */
502 502
                 $this->props['task_acceptance_state'] => olTaskDelegationUnknown, /* no reply yet */
503 503
                 $this->props['ownership'] => olDelegatedTask, /* Task has been assigned */
504
-                $this->props['taskhistory'] => thAssigned,    /* Task has been assigned */
504
+                $this->props['taskhistory'] => thAssigned, /* Task has been assigned */
505 505
                 PR_CONVERSATION_TOPIC => $messageprops[PR_SUBJECT],
506 506
                 PR_ICON_INDEX => ICON_TASK_ASSIGNER         /* Task request icon*/
507 507
             ));
@@ -518,12 +518,12 @@  discard block
 block discarded – undo
518 518
 
519 519
             // Make it a task request, and put it in sent items after it is sent
520 520
             mapi_setprops($outgoing, array(
521
-                PR_MESSAGE_CLASS => "IPM.TaskRequest",         /* class is task request */
522
-                $this->props['taskstate'] => tdsOWN,         /* for the recipient he is the task owner */
523
-                $this->props['taskmode'] => tdmtTaskReq,    /* for the recipient it's a request */
524
-                $this->props['updatecount'] => 1,            /* version 2 is in the attachment */
521
+                PR_MESSAGE_CLASS => "IPM.TaskRequest", /* class is task request */
522
+                $this->props['taskstate'] => tdsOWN, /* for the recipient he is the task owner */
523
+                $this->props['taskmode'] => tdmtTaskReq, /* for the recipient it's a request */
524
+                $this->props['updatecount'] => 1, /* version 2 is in the attachment */
525 525
                 PR_SUBJECT_PREFIX => $prefix,
526
-                PR_SUBJECT => $prefix . $messageprops[PR_SUBJECT]
526
+                PR_SUBJECT => $prefix.$messageprops[PR_SUBJECT]
527 527
             ));
528 528
 
529 529
             $attach = mapi_message_createattach($outgoing);
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
                     PR_ATTACHMENT_HIDDEN => true,
533 533
                     PR_DISPLAY_NAME => $messageprops[PR_SUBJECT]));
534 534
 
535
-            $sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_MODIFY | MAPI_CREATE);
535
+            $sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_MODIFY|MAPI_CREATE);
536 536
 
537 537
             mapi_copyto($this->message, array(), array(), $sub);
538 538
             mapi_savechanges($sub);
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
         function updateTaskRequest() {
554 554
             $messageprops = mapi_getprops($this->message, array($this->props['updatecount']));
555 555
 
556
-            if(isset($messageprops)) {
556
+            if (isset($messageprops)) {
557 557
                 $messageprops[$this->props['updatecount']]++;
558 558
             } else {
559 559
                 $messageprops[$this->props['updatecount']] = 1;
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
 
579 579
             // if task is updated in task folder then we don't need to process
580 580
             // old request.
581
-            if($this->isTaskRequestUpdated()) {
581
+            if ($this->isTaskRequestUpdated()) {
582 582
                 return true;
583 583
             }
584 584
 
@@ -629,10 +629,10 @@  discard block
 block discarded – undo
629 629
          * @return entryid EntryID of the accepted task
630 630
          */
631 631
         function doAccept() {
632
-            $prefix = _("Task Accepted:") . " ";
632
+            $prefix = _("Task Accepted:")." ";
633 633
             $messageProps = mapi_getprops($this->message, array(PR_MESSAGE_CLASS, $this->props['taskstate']));
634 634
 
635
-            if(!isset($messageProps[$this->props['taskstate']]) || $messageProps[$this->props['taskstate']] != tdsOWN) {
635
+            if (!isset($messageProps[$this->props['taskstate']]) || $messageProps[$this->props['taskstate']] != tdsOWN) {
636 636
                 // Can only accept assignee task
637 637
                 return false;
638 638
             }
@@ -678,10 +678,10 @@  discard block
 block discarded – undo
678 678
          * @return boolean TRUE on success, FALSE on failure
679 679
          */
680 680
         function doDecline() {
681
-            $prefix = _("Task Declined:") . " ";
681
+            $prefix = _("Task Declined:")." ";
682 682
             $messageProps = mapi_getprops($this->message, array($this->props['taskstate']));
683 683
 
684
-            if(!isset($messageProps[$this->props['taskstate']]) || $messageProps[$this->props['taskstate']] != tdsOWN) {
684
+            if (!isset($messageProps[$this->props['taskstate']]) || $messageProps[$this->props['taskstate']] != tdsOWN) {
685 685
                 return false; // Can only decline assignee task
686 686
             }
687 687
 
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
         function doUpdate() {
719 719
             $messageProps = mapi_getprops($this->message, array($this->props['taskstate'], PR_SUBJECT));
720 720
 
721
-            if(!isset($messageProps[$this->props['taskstate']]) || $messageProps[$this->props['taskstate']] != tdsOWN) {
721
+            if (!isset($messageProps[$this->props['taskstate']]) || $messageProps[$this->props['taskstate']] != tdsOWN) {
722 722
                 return false; // Can only update assignee task
723 723
             }
724 724
 
@@ -732,9 +732,9 @@  discard block
 block discarded – undo
732 732
 
733 733
             $props = mapi_getprops($this->message, array($this->props['taskupdates'], $this->props['tasksoc'], $this->props['recurring'], $this->props['complete']));
734 734
             if (!$props[$this->props['complete']] && $props[$this->props['taskupdates']] && !(isset($props[$this->props['recurring']]) && $props[$this->props['recurring']])) {
735
-                $this->sendResponse(tdmtTaskUpd, _("Task Updated:") . " ");
736
-            } else if($props[$this->props['complete']]) {
737
-                $this->sendResponse(tdmtTaskUpd, _("Task Completed:") . " ");
735
+                $this->sendResponse(tdmtTaskUpd, _("Task Updated:")." ");
736
+            } else if ($props[$this->props['complete']]) {
737
+                $this->sendResponse(tdmtTaskUpd, _("Task Completed:")." ");
738 738
             }
739 739
             return true;
740 740
         }
@@ -750,21 +750,21 @@  discard block
 block discarded – undo
750 750
             $ownerentryid = false;
751 751
 
752 752
             $rcvdprops = mapi_getprops($this->message, array(PR_RCVD_REPRESENTING_ENTRYID));
753
-            if(isset($rcvdprops[PR_RCVD_REPRESENTING_ENTRYID])) {
753
+            if (isset($rcvdprops[PR_RCVD_REPRESENTING_ENTRYID])) {
754 754
                 $ownerentryid = $rcvdprops;
755 755
             }
756 756
 
757
-            if(!$ownerentryid) {
757
+            if (!$ownerentryid) {
758 758
                 $store = $this->store;
759 759
             } else {
760 760
                 $ab = mapi_openaddressbook($this->session);
761
-                if(!$ab) return false;
761
+                if (!$ab) return false;
762 762
 
763 763
                 $mailuser = mapi_ab_openentry($ab, $ownerentryid);
764
-                if(!$mailuser) return false;
764
+                if (!$mailuser) return false;
765 765
 
766 766
                 $mailuserprops = mapi_getprops($mailuser, array(PR_EMAIL_ADDRESS));
767
-                if(!isset($mailuserprops[PR_EMAIL_ADDRESS])) return false;
767
+                if (!isset($mailuserprops[PR_EMAIL_ADDRESS])) return false;
768 768
 
769 769
                 $storeid = mapi_msgstore_createentryid($this->store, $mailuserprops[PR_EMAIL_ADDRESS]);
770 770
 
@@ -783,7 +783,7 @@  discard block
 block discarded – undo
783 783
 
784 784
             $inbox = mapi_msgstore_getreceivefolder($store);
785 785
             $inboxprops = mapi_getprops($inbox, Array(PR_IPM_TASK_ENTRYID));
786
-            if(!isset($inboxprops[PR_IPM_TASK_ENTRYID]))
786
+            if (!isset($inboxprops[PR_IPM_TASK_ENTRYID]))
787 787
                 return false;
788 788
 
789 789
             return mapi_msgstore_openentry($store, $inboxprops[PR_IPM_TASK_ENTRYID]);
@@ -827,10 +827,10 @@  discard block
 block discarded – undo
827 827
             $storeprops = mapi_getprops($store, array(PR_IPM_OUTBOX_ENTRYID, PR_IPM_SENTMAIL_ENTRYID));
828 828
 
829 829
             $outbox = mapi_msgstore_openentry($store, $storeprops[PR_IPM_OUTBOX_ENTRYID]);
830
-            if(!$outbox) return false;
830
+            if (!$outbox) return false;
831 831
 
832 832
             $outgoing = mapi_folder_createmessage($outbox);
833
-            if(!$outgoing) return false;
833
+            if (!$outgoing) return false;
834 834
 
835 835
             // Set SENT_REPRESENTING in case we're sending as a delegate
836 836
             $ownerstore = $this->getTaskFolderStore();
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
 
857 857
             $attach = mapi_message_createattach($outgoing);
858 858
             mapi_setprops($attach, array(PR_ATTACH_METHOD => ATTACH_EMBEDDED_MSG, PR_DISPLAY_NAME => $messageprops[PR_CONVERSATION_TOPIC], PR_ATTACHMENT_HIDDEN => true));
859
-            $sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_CREATE | MAPI_MODIFY);
859
+            $sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_CREATE|MAPI_MODIFY);
860 860
 
861 861
             $message = !$this->isTaskRequest() ? $this->message : $this->getAssociatedTask(false);
862 862
 
@@ -870,7 +870,7 @@  discard block
 block discarded – undo
870 870
             }
871 871
 
872 872
             $props = array();
873
-            switch($type) {
873
+            switch ($type) {
874 874
                 case tdmtTaskAcc:
875 875
                     $props[PR_MESSAGE_CLASS] = "IPM.TaskRequest.Accept";
876 876
                     mapi_setprops($sub, array(PR_ICON_INDEX => ICON_TASK_ASSIGNER));
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
                     break;
882 882
                 case tdmtTaskUpd:
883 883
                     mapi_setprops($sub, array(PR_ICON_INDEX => ICON_TASK_ASSIGNER));
884
-                    if($messageprops[$this->props['complete']]) {
884
+                    if ($messageprops[$this->props['complete']]) {
885 885
                         $props[PR_MESSAGE_CLASS] = "IPM.TaskRequest.Complete";
886 886
                     } else {
887 887
                         $props[PR_MESSAGE_CLASS] = "IPM.TaskRequest.Update";
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
             mapi_savechanges($sub);
894 894
             mapi_savechanges($attach);
895 895
 
896
-            $props[PR_SUBJECT] = $prefix . $messageprops[PR_CONVERSATION_TOPIC];
896
+            $props[PR_SUBJECT] = $prefix.$messageprops[PR_CONVERSATION_TOPIC];
897 897
             $props[$this->props['taskmode']] = $type;
898 898
             $props[$this->props['task_assigned_time']] = time();
899 899
 
@@ -903,7 +903,7 @@  discard block
 block discarded – undo
903 903
             // edit response before sending task response.
904 904
             if ($this->taskCommentsInfo) {
905 905
                 $comments = $this->getTaskCommentsInfo();
906
-                $stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, STGM_TRANSACTED, MAPI_CREATE | MAPI_MODIFY);
906
+                $stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, STGM_TRANSACTED, MAPI_CREATE|MAPI_MODIFY);
907 907
                 mapi_stream_setsize($stream, strlen($comments));
908 908
                 mapi_stream_write($stream, $comments);
909 909
                 mapi_stream_commit($stream);
@@ -919,8 +919,8 @@  discard block
 block discarded – undo
919 919
             $table = mapi_getmsgstorestable($this->session);
920 920
             $rows = mapi_table_queryallrows($table, array(PR_DEFAULT_STORE, PR_ENTRYID));
921 921
 
922
-            foreach($rows as $row) {
923
-                if($row[PR_DEFAULT_STORE])
922
+            foreach ($rows as $row) {
923
+                if ($row[PR_DEFAULT_STORE])
924 924
                     return mapi_openmsgstore($this->session, $row[PR_ENTRYID]);
925 925
             }
926 926
 
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
         function createTGOID()
936 936
         {
937 937
             $goid = "";
938
-            for($i=0;$i<16;$i++) {
938
+            for ($i = 0; $i < 16; $i++) {
939 939
                 $goid .= chr(rand(0, 255));
940 940
             }
941 941
             return $goid;
@@ -959,7 +959,7 @@  discard block
 block discarded – undo
959 959
                             );
960 960
             $rows = mapi_table_queryallrows($attachmentTable, array(PR_ATTACH_NUM), $restriction);
961 961
 
962
-            if(empty($rows)) {
962
+            if (empty($rows)) {
963 963
                 return $task;
964 964
             }
965 965
 
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
                 }
973 973
 
974 974
                 $taskGoid = mapi_getprops($task, array($this->props["task_goid"]));
975
-                if($goid[$this->props["task_goid"]] === $taskGoid[$this->props["task_goid"]]) {
975
+                if ($goid[$this->props["task_goid"]] === $taskGoid[$this->props["task_goid"]]) {
976 976
                     mapi_setprops($attach, array(PR_ATTACHMENT_HIDDEN => true));
977 977
                     mapi_savechanges($attach);
978 978
                     mapi_savechanges($message);
@@ -1042,11 +1042,11 @@  discard block
 block discarded – undo
1042 1042
 
1043 1043
             // Delete all MAPI_TO recipients
1044 1044
             $recips = mapi_table_queryallrows($recipTable, array(PR_ROWID), array(RES_PROPERTY,
1045
-                                                                                array(    RELOP => RELOP_EQ,
1045
+                                                                                array(RELOP => RELOP_EQ,
1046 1046
                                                                                         ULPROPTAG => PR_RECIPIENT_TYPE,
1047 1047
                                                                                         VALUE => MAPI_TO
1048 1048
                                                                                 )));
1049
-            foreach($recips as $recip) {
1049
+            foreach ($recips as $recip) {
1050 1050
                 mapi_message_modifyrecipients($task, MODRECIP_REMOVE, array($recip));
1051 1051
             }
1052 1052
 
@@ -1112,7 +1112,7 @@  discard block
 block discarded – undo
1112 1112
 
1113 1113
             $rows = mapi_table_queryallrows($contents, array(PR_ENTRYID, PR_PARENT_ENTRYID, PR_STORE_ENTRYID), $restriction);
1114 1114
 
1115
-            if(!empty($rows)) {
1115
+            if (!empty($rows)) {
1116 1116
                 // If there are multiple, just use the first
1117 1117
                 $entryid = $rows[0][PR_ENTRYID];
1118 1118
                 $wastebasket = mapi_msgstore_openentry($store, $storeProps[PR_IPM_WASTEBASKET_ENTRYID]);
@@ -1146,7 +1146,7 @@  discard block
 block discarded – undo
1146 1146
 
1147 1147
                 $recipTable = mapi_message_getrecipienttable($this->message);
1148 1148
                 $recips = mapi_table_queryallrows($recipTable, $this->recipProps, array(RES_PROPERTY,
1149
-                                                                                        array(    RELOP => RELOP_EQ,
1149
+                                                                                        array(RELOP => RELOP_EQ,
1150 1150
                                                                                                 ULPROPTAG => PR_RECIPIENT_TYPE,
1151 1151
                                                                                                 VALUE => ($isComplete ? MAPI_BCC : MAPI_CC)
1152 1152
                                                                                         )
@@ -1157,8 +1157,8 @@  discard block
 block discarded – undo
1157 1157
                     return false;
1158 1158
                 }
1159 1159
 
1160
-                foreach($recips as $recip) {
1161
-                    $recip[PR_RECIPIENT_TYPE] = MAPI_TO;    // Change recipient type to MAPI_TO
1160
+                foreach ($recips as $recip) {
1161
+                    $recip[PR_RECIPIENT_TYPE] = MAPI_TO; // Change recipient type to MAPI_TO
1162 1162
                     mapi_message_modifyrecipients($outgoing, MODRECIP_ADD, array($recip));
1163 1163
                 }
1164 1164
                 return true;
@@ -1187,7 +1187,7 @@  discard block
 block discarded – undo
1187 1187
             $recipTable = mapi_message_getrecipienttable($message);
1188 1188
             $recipRows = mapi_table_queryallrows($recipTable, array(PR_ROWID));
1189 1189
 
1190
-            foreach($recipRows as $recipient) {
1190
+            foreach ($recipRows as $recipient) {
1191 1191
                 mapi_message_modifyrecipients($message, MODRECIP_REMOVE, array($recipient));
1192 1192
             }
1193 1193
         }
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
         {
1203 1203
             $messageprops = mapi_getprops($this->message, array($this->props['taskstate']));
1204 1204
 
1205
-            if(!isset($messageprops[$this->props['taskstate']]) || $messageprops[$this->props['taskstate']] != tdsOWN) {
1205
+            if (!isset($messageprops[$this->props['taskstate']]) || $messageprops[$this->props['taskstate']] != tdsOWN) {
1206 1206
                 return false; // Can only decline assignee task
1207 1207
             }
1208 1208
 
Please login to merge, or discard this patch.
Braces   +21 added lines, -9 removed lines patch added patch discarded remove patch
@@ -758,13 +758,19 @@  discard block
 block discarded – undo
758 758
                 $store = $this->store;
759 759
             } else {
760 760
                 $ab = mapi_openaddressbook($this->session);
761
-                if(!$ab) return false;
761
+                if(!$ab) {
762
+                    return false;
763
+                }
762 764
 
763 765
                 $mailuser = mapi_ab_openentry($ab, $ownerentryid);
764
-                if(!$mailuser) return false;
766
+                if(!$mailuser) {
767
+                    return false;
768
+                }
765 769
 
766 770
                 $mailuserprops = mapi_getprops($mailuser, array(PR_EMAIL_ADDRESS));
767
-                if(!isset($mailuserprops[PR_EMAIL_ADDRESS])) return false;
771
+                if(!isset($mailuserprops[PR_EMAIL_ADDRESS])) {
772
+                    return false;
773
+                }
768 774
 
769 775
                 $storeid = mapi_msgstore_createentryid($this->store, $mailuserprops[PR_EMAIL_ADDRESS]);
770 776
 
@@ -783,8 +789,9 @@  discard block
 block discarded – undo
783 789
 
784 790
             $inbox = mapi_msgstore_getreceivefolder($store);
785 791
             $inboxprops = mapi_getprops($inbox, Array(PR_IPM_TASK_ENTRYID));
786
-            if(!isset($inboxprops[PR_IPM_TASK_ENTRYID]))
787
-                return false;
792
+            if(!isset($inboxprops[PR_IPM_TASK_ENTRYID])) {
793
+                            return false;
794
+            }
788 795
 
789 796
             return mapi_msgstore_openentry($store, $inboxprops[PR_IPM_TASK_ENTRYID]);
790 797
         }
@@ -827,10 +834,14 @@  discard block
 block discarded – undo
827 834
             $storeprops = mapi_getprops($store, array(PR_IPM_OUTBOX_ENTRYID, PR_IPM_SENTMAIL_ENTRYID));
828 835
 
829 836
             $outbox = mapi_msgstore_openentry($store, $storeprops[PR_IPM_OUTBOX_ENTRYID]);
830
-            if(!$outbox) return false;
837
+            if(!$outbox) {
838
+                return false;
839
+            }
831 840
 
832 841
             $outgoing = mapi_folder_createmessage($outbox);
833
-            if(!$outgoing) return false;
842
+            if(!$outgoing) {
843
+                return false;
844
+            }
834 845
 
835 846
             // Set SENT_REPRESENTING in case we're sending as a delegate
836 847
             $ownerstore = $this->getTaskFolderStore();
@@ -920,8 +931,9 @@  discard block
 block discarded – undo
920 931
             $rows = mapi_table_queryallrows($table, array(PR_DEFAULT_STORE, PR_ENTRYID));
921 932
 
922 933
             foreach($rows as $row) {
923
-                if($row[PR_DEFAULT_STORE])
924
-                    return mapi_openmsgstore($this->session, $row[PR_ENTRYID]);
934
+                if($row[PR_DEFAULT_STORE]) {
935
+                                    return mapi_openmsgstore($this->session, $row[PR_ENTRYID]);
936
+                }
925 937
             }
926 938
 
927 939
             return false;
Please login to merge, or discard this patch.
mapi/class.recurrence.php 3 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -439,13 +439,13 @@  discard block
 block discarded – undo
439 439
         }
440 440
 
441 441
         /**
442
-        * This function returns the next remindertime starting from $timestamp
443
-        * When no next reminder exists, false is returned.
444
-        *
445
-        * Note: Before saving this new reminder time (when snoozing), you must check for
446
-        *       yourself if this reminder time is earlier than your snooze time, else
447
-        *       use your snooze time and not this reminder time.
448
-        */
442
+         * This function returns the next remindertime starting from $timestamp
443
+         * When no next reminder exists, false is returned.
444
+         *
445
+         * Note: Before saving this new reminder time (when snoozing), you must check for
446
+         *       yourself if this reminder time is earlier than your snooze time, else
447
+         *       use your snooze time and not this reminder time.
448
+         */
449 449
         function getNextReminderTime($timestamp)
450 450
         {
451 451
             /**
@@ -618,10 +618,10 @@  discard block
 block discarded – undo
618 618
                 } else {
619 619
                     if ($occSingleDayRank) {
620 620
                         $pattern = sprintf(ngettext('Occurs every %s effective %s for %s occurence.',
621
-                                                     'Occurs every %s effective %s for %s occurences.', $numocc), $type, $start, $numocc);
621
+                                                        'Occurs every %s effective %s for %s occurences.', $numocc), $type, $start, $numocc);
622 622
                     } else {
623 623
                         $pattern = sprintf(ngettext('Occurs every %s %s effective %s for %s occurence.',
624
-                                                         'Occurs every %s %s effective %s for %s occurences.', $numocc), $everyn, $type, $start, $numocc);
624
+                                                            'Occurs every %s %s effective %s for %s occurences.', $numocc), $everyn, $type, $start, $numocc);
625 625
                     }
626 626
                 }
627 627
             } else if ($term == 0x21) {
@@ -683,18 +683,18 @@  discard block
 block discarded – undo
683 683
          */
684 684
         function createExceptionAttachment($exception_props, $exception_recips = array(), $copy_attach_from = false)
685 685
         {
686
-              // Create new attachment.
687
-              $attachment = mapi_message_createattach($this->message);
688
-              $props = array();
689
-              $props[PR_ATTACHMENT_FLAGS] = 2;
690
-              $props[PR_ATTACHMENT_HIDDEN] = true;
691
-              $props[PR_ATTACHMENT_LINKID] = 0;
692
-              $props[PR_ATTACH_FLAGS] = 0;
693
-              $props[PR_ATTACH_METHOD] = 5;
694
-              $props[PR_DISPLAY_NAME] = "Exception";
695
-              $props[PR_EXCEPTION_STARTTIME] = $this->fromGMT($this->tz, $exception_props[$this->proptags["startdate"]]);
696
-              $props[PR_EXCEPTION_ENDTIME] = $this->fromGMT($this->tz, $exception_props[$this->proptags["duedate"]]);
697
-              mapi_setprops($attachment, $props);
686
+                // Create new attachment.
687
+                $attachment = mapi_message_createattach($this->message);
688
+                $props = array();
689
+                $props[PR_ATTACHMENT_FLAGS] = 2;
690
+                $props[PR_ATTACHMENT_HIDDEN] = true;
691
+                $props[PR_ATTACHMENT_LINKID] = 0;
692
+                $props[PR_ATTACH_FLAGS] = 0;
693
+                $props[PR_ATTACH_METHOD] = 5;
694
+                $props[PR_DISPLAY_NAME] = "Exception";
695
+                $props[PR_EXCEPTION_STARTTIME] = $this->fromGMT($this->tz, $exception_props[$this->proptags["startdate"]]);
696
+                $props[PR_EXCEPTION_ENDTIME] = $this->fromGMT($this->tz, $exception_props[$this->proptags["duedate"]]);
697
+                mapi_setprops($attachment, $props);
698 698
 
699 699
             $imessage = mapi_attach_openobj($attachment, MAPI_CREATE | MAPI_MODIFY);
700 700
 
@@ -748,11 +748,11 @@  discard block
 block discarded – undo
748 748
                 $tempattach = mapi_message_openattach($this->message, $attachRow[PR_ATTACH_NUM]);
749 749
                 $exception = mapi_attach_openobj($tempattach);
750 750
 
751
-                  $data = mapi_message_getprops($exception, array($this->proptags["basedate"]));
751
+                    $data = mapi_message_getprops($exception, array($this->proptags["basedate"]));
752 752
 
753
-                  if($this->dayStartOf($this->fromGMT($this->tz, $data[$this->proptags["basedate"]])) == $this->dayStartOf($base_date)) {
754
-                      mapi_message_deleteattach($this->message, $attachRow[PR_ATTACH_NUM]);
755
-                  }
753
+                    if($this->dayStartOf($this->fromGMT($this->tz, $data[$this->proptags["basedate"]])) == $this->dayStartOf($base_date)) {
754
+                        mapi_message_deleteattach($this->message, $attachRow[PR_ATTACH_NUM]);
755
+                    }
756 756
             }
757 757
         }
758 758
 
@@ -1125,19 +1125,19 @@  discard block
 block discarded – undo
1125 1125
                     }
1126 1126
 
1127 1127
                     if (!$found) {
1128
-                       $foundInDeletedRecipients = false;
1129
-                       // Look if the $recipient is in the list of deleted recipients
1130
-                       if (!empty($deletedRecipients)) {
1131
-                               foreach($deletedRecipients as $recip) {
1132
-                                   if ($recip[PR_SEARCH_KEY] == $recipient[PR_SEARCH_KEY]){
1133
-                                       $foundInDeletedRecipients = true;
1134
-                                       break;
1135
-                                   }
1136
-                               }
1137
-                       }
1138
-
1139
-                       // If recipient is not in list of deleted recipient, add him
1140
-                       if (!$foundInDeletedRecipients) {
1128
+                        $foundInDeletedRecipients = false;
1129
+                        // Look if the $recipient is in the list of deleted recipients
1130
+                        if (!empty($deletedRecipients)) {
1131
+                                foreach($deletedRecipients as $recip) {
1132
+                                    if ($recip[PR_SEARCH_KEY] == $recipient[PR_SEARCH_KEY]){
1133
+                                        $foundInDeletedRecipients = true;
1134
+                                        break;
1135
+                                    }
1136
+                                }
1137
+                        }
1138
+
1139
+                        // If recipient is not in list of deleted recipient, add him
1140
+                        if (!$foundInDeletedRecipients) {
1141 1141
                             if (!isset($recipient[PR_RECIPIENT_FLAGS]) || $recipient[PR_RECIPIENT_FLAGS] != (recipReserved | recipExceptionalDeleted | recipSendable)) {
1142 1142
                                 $recipient[PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalDeleted;
1143 1143
                             } else {
Please login to merge, or discard this patch.
Spacing   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -114,17 +114,17 @@  discard block
 block discarded – undo
114 114
             $basetime = $baseday + $this->recur["startocc"] * 60;
115 115
 
116 116
             // Remove any pre-existing exception on this base date
117
-            if($this->isException($baseday)) {
117
+            if ($this->isException($baseday)) {
118 118
                 $this->deleteException($baseday); // note that deleting an exception is different from creating a deleted exception (deleting an occurrence).
119 119
             }
120 120
 
121
-            if(!$delete) {
122
-                if(isset($exception_props[$this->proptags["startdate"]]) && !$this->isValidExceptionDate($base_date, $this->fromGMT($this->tz, $exception_props[$this->proptags["startdate"]]))) {
121
+            if (!$delete) {
122
+                if (isset($exception_props[$this->proptags["startdate"]]) && !$this->isValidExceptionDate($base_date, $this->fromGMT($this->tz, $exception_props[$this->proptags["startdate"]]))) {
123 123
                     return false;
124 124
                 }
125 125
                 // Properties in the attachment are the properties of the base object, plus $exception_props plus the base date
126 126
                 foreach (array("subject", "location", "label", "reminder", "reminder_minutes", "alldayevent", "busystatus") as $propname) {
127
-                    if(isset($this->messageprops[$this->proptags[$propname]]))
127
+                    if (isset($this->messageprops[$this->proptags[$propname]]))
128 128
                         $props[$this->proptags[$propname]] = $this->messageprops[$this->proptags[$propname]];
129 129
                 }
130 130
 
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
                 }
146 146
 
147 147
                 // synchronize commonstart/commonend with startdate/duedate
148
-                if(isset($props[$this->proptags["startdate"]])) {
148
+                if (isset($props[$this->proptags["startdate"]])) {
149 149
                     $props[$this->proptags["commonstart"]] = $props[$this->proptags["startdate"]];
150 150
                 }
151 151
 
152
-                if(isset($props[$this->proptags["duedate"]])) {
152
+                if (isset($props[$this->proptags["duedate"]])) {
153 153
                     $props[$this->proptags["commonend"]] = $props[$this->proptags["duedate"]];
154 154
                 }
155 155
 
@@ -162,31 +162,31 @@  discard block
 block discarded – undo
162 162
                 $changed_item["start"] = $this->fromGMT($this->tz, $props[$this->proptags["startdate"]]);
163 163
                 $changed_item["end"] = $this->fromGMT($this->tz, $props[$this->proptags["duedate"]]);
164 164
 
165
-                if(array_key_exists($this->proptags["subject"], $exception_props)) {
165
+                if (array_key_exists($this->proptags["subject"], $exception_props)) {
166 166
                     $changed_item["subject"] = $exception_props[$this->proptags["subject"]];
167 167
                 }
168 168
 
169
-                if(array_key_exists($this->proptags["location"], $exception_props)) {
169
+                if (array_key_exists($this->proptags["location"], $exception_props)) {
170 170
                     $changed_item["location"] = $exception_props[$this->proptags["location"]];
171 171
                 }
172 172
 
173
-                if(array_key_exists($this->proptags["label"], $exception_props)) {
173
+                if (array_key_exists($this->proptags["label"], $exception_props)) {
174 174
                     $changed_item["label"] = $exception_props[$this->proptags["label"]];
175 175
                 }
176 176
 
177
-                if(array_key_exists($this->proptags["reminder"], $exception_props)) {
177
+                if (array_key_exists($this->proptags["reminder"], $exception_props)) {
178 178
                     $changed_item["reminder_set"] = $exception_props[$this->proptags["reminder"]];
179 179
                 }
180 180
 
181
-                if(array_key_exists($this->proptags["reminder_minutes"], $exception_props)) {
181
+                if (array_key_exists($this->proptags["reminder_minutes"], $exception_props)) {
182 182
                     $changed_item["remind_before"] = $exception_props[$this->proptags["reminder_minutes"]];
183 183
                 }
184 184
 
185
-                if(array_key_exists($this->proptags["alldayevent"], $exception_props)) {
185
+                if (array_key_exists($this->proptags["alldayevent"], $exception_props)) {
186 186
                     $changed_item["alldayevent"] = $exception_props[$this->proptags["alldayevent"]];
187 187
                 }
188 188
 
189
-                if(array_key_exists($this->proptags["busystatus"], $exception_props)) {
189
+                if (array_key_exists($this->proptags["busystatus"], $exception_props)) {
190 190
                     $changed_item["busystatus"] = $exception_props[$this->proptags["busystatus"]];
191 191
                 }
192 192
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
             }
199 199
 
200 200
             // Turn on hideattachments, because the attachments in this item are the exceptions
201
-            mapi_setprops($this->message, array ( $this->proptags["hideattachments"] => true ));
201
+            mapi_setprops($this->message, array($this->proptags["hideattachments"] => true));
202 202
 
203 203
             // Save recurrence data to message
204 204
             $this->saveRecurrence();
@@ -212,74 +212,74 @@  discard block
 block discarded – undo
212 212
          */
213 213
         function modifyException($exception_props, $base_date, $exception_recips = array(), $copy_attach_from = false)
214 214
         {
215
-            if(isset($exception_props[$this->proptags["startdate"]]) && !$this->isValidExceptionDate($base_date, $this->fromGMT($this->tz, $exception_props[$this->proptags["startdate"]]))) {
215
+            if (isset($exception_props[$this->proptags["startdate"]]) && !$this->isValidExceptionDate($base_date, $this->fromGMT($this->tz, $exception_props[$this->proptags["startdate"]]))) {
216 216
                 return false;
217 217
             }
218 218
 
219 219
             $baseday = $this->dayStartOf($base_date);
220 220
             $extomodify = false;
221 221
 
222
-            for($i = 0, $len = count($this->recur["changed_occurences"]); $i < $len; $i++) {
223
-                if($this->isSameDay($this->recur["changed_occurences"][$i]["basedate"], $baseday))
222
+            for ($i = 0, $len = count($this->recur["changed_occurences"]); $i < $len; $i++) {
223
+                if ($this->isSameDay($this->recur["changed_occurences"][$i]["basedate"], $baseday))
224 224
                     $extomodify = &$this->recur["changed_occurences"][$i];
225 225
             }
226 226
 
227
-            if(!$extomodify)
227
+            if (!$extomodify)
228 228
                 return false;
229 229
 
230 230
             // remove basedate property as we want to preserve the old value
231 231
             // client will send basedate with time part as zero, so discard that value
232 232
             unset($exception_props[$this->proptags["basedate"]]);
233 233
 
234
-            if(array_key_exists($this->proptags["startdate"], $exception_props)) {
234
+            if (array_key_exists($this->proptags["startdate"], $exception_props)) {
235 235
                 $extomodify["start"] = $this->fromGMT($this->tz, $exception_props[$this->proptags["startdate"]]);
236 236
             }
237 237
 
238
-            if(array_key_exists($this->proptags["duedate"], $exception_props)) {
239
-                $extomodify["end"] =   $this->fromGMT($this->tz, $exception_props[$this->proptags["duedate"]]);
238
+            if (array_key_exists($this->proptags["duedate"], $exception_props)) {
239
+                $extomodify["end"] = $this->fromGMT($this->tz, $exception_props[$this->proptags["duedate"]]);
240 240
             }
241 241
 
242
-            if(array_key_exists($this->proptags["subject"], $exception_props)) {
242
+            if (array_key_exists($this->proptags["subject"], $exception_props)) {
243 243
                 $extomodify["subject"] = $exception_props[$this->proptags["subject"]];
244 244
             }
245 245
 
246
-            if(array_key_exists($this->proptags["location"], $exception_props)) {
246
+            if (array_key_exists($this->proptags["location"], $exception_props)) {
247 247
                 $extomodify["location"] = $exception_props[$this->proptags["location"]];
248 248
             }
249 249
 
250
-            if(array_key_exists($this->proptags["label"], $exception_props)) {
250
+            if (array_key_exists($this->proptags["label"], $exception_props)) {
251 251
                 $extomodify["label"] = $exception_props[$this->proptags["label"]];
252 252
             }
253 253
 
254
-            if(array_key_exists($this->proptags["reminder"], $exception_props)) {
254
+            if (array_key_exists($this->proptags["reminder"], $exception_props)) {
255 255
                 $extomodify["reminder_set"] = $exception_props[$this->proptags["reminder"]];
256 256
             }
257 257
 
258
-            if(array_key_exists($this->proptags["reminder_minutes"], $exception_props)) {
258
+            if (array_key_exists($this->proptags["reminder_minutes"], $exception_props)) {
259 259
                 $extomodify["remind_before"] = $exception_props[$this->proptags["reminder_minutes"]];
260 260
             }
261 261
 
262
-            if(array_key_exists($this->proptags["alldayevent"], $exception_props)) {
262
+            if (array_key_exists($this->proptags["alldayevent"], $exception_props)) {
263 263
                 $extomodify["alldayevent"] = $exception_props[$this->proptags["alldayevent"]];
264 264
             }
265 265
 
266
-            if(array_key_exists($this->proptags["busystatus"], $exception_props)) {
266
+            if (array_key_exists($this->proptags["busystatus"], $exception_props)) {
267 267
                 $extomodify["busystatus"] = $exception_props[$this->proptags["busystatus"]];
268 268
             }
269 269
 
270 270
             $exception_props[PR_MESSAGE_CLASS] = "IPM.OLE.CLASS.{00061055-0000-0000-C000-000000000046}";
271 271
 
272 272
             // synchronize commonstart/commonend with startdate/duedate
273
-            if(isset($exception_props[$this->proptags["startdate"]])) {
273
+            if (isset($exception_props[$this->proptags["startdate"]])) {
274 274
                 $exception_props[$this->proptags["commonstart"]] = $exception_props[$this->proptags["startdate"]];
275 275
             }
276 276
 
277
-            if(isset($exception_props[$this->proptags["duedate"]])) {
277
+            if (isset($exception_props[$this->proptags["duedate"]])) {
278 278
                 $exception_props[$this->proptags["commonend"]] = $exception_props[$this->proptags["duedate"]];
279 279
             }
280 280
 
281 281
             $attach = $this->getExceptionAttachment($baseday);
282
-            if(!$attach) {
282
+            if (!$attach) {
283 283
                 if ($copy_attach_from) {
284 284
                     $this->deleteExceptionAttachment($base_date);
285 285
                     $this->createException($exception_props, $base_date, false, $exception_recips, $copy_attach_from);
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
             // The way we do this is to look at the days that we're 'moving' the item in the exception. Each
327 327
             // of these days may only contain the item that we're modifying. Any other item violates the rules.
328 328
 
329
-            if($this->isException($basedate)) {
329
+            if ($this->isException($basedate)) {
330 330
                 // If we're modifying an exception, we want to look at the days that we're 'moving' compared to where
331 331
                 // the exception used to be.
332 332
                 $oldexception = $this->getChangeException($basedate);
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
             $startday = $this->dayStartOf($start);
340 340
 
341 341
             // Get all the occurrences on the days between the basedate (may be reversed)
342
-            if($prevday < $startday)
342
+            if ($prevday < $startday)
343 343
                 $items = $this->getItems($this->toGMT($this->tz, $prevday), $this->toGMT($this->tz, $startday + 24 * 60 * 60));
344 344
             else
345 345
                 $items = $this->getItems($this->toGMT($this->tz, $startday), $this->toGMT($this->tz, $prevday + 24 * 60 * 60));
@@ -366,12 +366,12 @@  discard block
 block discarded – undo
366 366
             // get all occurence items before the seleceted items occurence starttime
367 367
             $occitems = $this->getItems($this->messageprops[$this->proptags["startdate"]], $this->toGMT($this->tz, $basedate));
368 368
 
369
-            if(!empty($occitems)) {
369
+            if (!empty($occitems)) {
370 370
                 // as occitems array is sorted in ascending order of startdate, to get the previous occurence we take the last items in occitems .
371 371
                 $previousitem_startdate = $occitems[count($occitems) - 1][$this->proptags["startdate"]];
372 372
 
373 373
                 // if our reminder is set before or equal to the beginning of the previous occurrence, then that's not allowed
374
-                if($startdate - ($reminderminutes*60) <= $previousitem_startdate)
374
+                if ($startdate - ($reminderminutes * 60) <= $previousitem_startdate)
375 375
                     return false;
376 376
             }
377 377
 
@@ -380,12 +380,12 @@  discard block
 block discarded – undo
380 380
 
381 381
             // If there are another two occurrences, then the first is the current occurrence, and the one after that
382 382
             // is the next occurrence.
383
-            if(count($currentOcc) > 1) {
383
+            if (count($currentOcc) > 1) {
384 384
                 $next = $currentOcc[1];
385 385
                 // Get reminder time of the next occurrence.
386 386
                 $nextOccReminderTime = $next[$this->proptags["startdate"]] - ($next[$this->proptags["reminder_minutes"]] * 60);
387 387
                 // If the reminder time of the next item is before the start of this item, then that's not allowed
388
-                if($nextOccReminderTime <= $startdate)
388
+                if ($nextOccReminderTime <= $startdate)
389 389
                     return false;
390 390
             }
391 391
 
@@ -396,15 +396,15 @@  discard block
 block discarded – undo
396 396
         function setRecurrence($tz, $recur)
397 397
         {
398 398
             // only reset timezone if specified
399
-            if($tz)
399
+            if ($tz)
400 400
                 $this->tz = $tz;
401 401
 
402 402
             $this->recur = $recur;
403 403
 
404
-            if(!isset($this->recur["changed_occurences"]))
404
+            if (!isset($this->recur["changed_occurences"]))
405 405
                 $this->recur["changed_occurences"] = Array();
406 406
 
407
-            if(!isset($this->recur["deleted_occurences"]))
407
+            if (!isset($this->recur["deleted_occurences"]))
408 408
                 $this->recur["deleted_occurences"] = Array();
409 409
 
410 410
             $this->deleteAttachments();
@@ -412,29 +412,29 @@  discard block
 block discarded – undo
412 412
 
413 413
             // if client has not set the recurring_pattern then we should generate it and save it
414 414
             $messageProps = mapi_getprops($this->message, Array($this->proptags["recurring_pattern"]));
415
-            if(empty($messageProps[$this->proptags["recurring_pattern"]])) {
415
+            if (empty($messageProps[$this->proptags["recurring_pattern"]])) {
416 416
                 $this->saveRecurrencePattern();
417 417
             }
418 418
         }
419 419
 
420 420
         // Returns the start or end time of the occurrence on the given base date.
421 421
         // This assumes that the basedate you supply is in LOCAL time
422
-        function getOccurrenceStart($basedate)  {
422
+        function getOccurrenceStart($basedate) {
423 423
             $daystart = $this->dayStartOf($basedate);
424 424
             return $this->toGMT($this->tz, $daystart + $this->recur["startocc"] * 60);
425 425
         }
426 426
 
427
-        function getOccurrenceEnd($basedate)  {
427
+        function getOccurrenceEnd($basedate) {
428 428
             $daystart = $this->dayStartOf($basedate);
429 429
             return $this->toGMT($this->tz, $daystart + $this->recur["endocc"] * 60);
430 430
         }
431 431
 
432 432
 
433 433
         // Backwards compatible code
434
-        function getOccurenceStart($basedate)  {
434
+        function getOccurenceStart($basedate) {
435 435
             return $this->getOccurrenceStart($basedate);
436 436
         }
437
-        function getOccurenceEnd($basedate)  {
437
+        function getOccurenceEnd($basedate) {
438 438
             return $this->getOccurrenceEnd($basedate);
439 439
         }
440 440
 
@@ -464,13 +464,13 @@  discard block
 block discarded – undo
464 464
              * On the first occurence of greater nextreminder break the loop
465 465
              * and return the value to calling function.
466 466
              */
467
-            for($i = 0, $len = count($items); $i < $len; $i++)
467
+            for ($i = 0, $len = count($items); $i < $len; $i++)
468 468
             {
469 469
                 $item = $items[$i];
470
-                $tempnextreminder = $item[$this->proptags["startdate"]] - ( $item[$this->proptags["reminder_minutes"]] * 60 );
470
+                $tempnextreminder = $item[$this->proptags["startdate"]] - ($item[$this->proptags["reminder_minutes"]] * 60);
471 471
 
472 472
                 // If tempnextreminder is greater than timestamp then save it in nextreminder and break from the loop.
473
-                if($tempnextreminder > $timestamp)
473
+                if ($tempnextreminder > $timestamp)
474 474
                 {
475 475
                     $nextreminder = $tempnextreminder;
476 476
                     break;
@@ -575,8 +575,8 @@  discard block
 block discarded – undo
575 575
             }
576 576
 
577 577
             // get timings of the first occurence
578
-            $firstoccstartdate = isset($startocc) ? $start + (((int) $startocc) * 60) : $start;
579
-            $firstoccenddate = isset($endocc) ? $end + (((int) $endocc) * 60) : $end;
578
+            $firstoccstartdate = isset($startocc) ? $start + (((int)$startocc) * 60) : $start;
579
+            $firstoccenddate = isset($endocc) ? $end + (((int)$endocc) * 60) : $end;
580 580
 
581 581
             $start = gmdate(_('d-m-Y'), $firstoccstartdate);
582 582
             $end = gmdate(_('d-m-Y'), $firstoccenddate);
@@ -641,8 +641,8 @@  discard block
 block discarded – undo
641 641
                 }
642 642
             }
643 643
 
644
-            if(!empty($pattern)) {
645
-                mapi_setprops($this->message, Array($this->proptags["recurring_pattern"] => $pattern ));
644
+            if (!empty($pattern)) {
645
+                mapi_setprops($this->message, Array($this->proptags["recurring_pattern"] => $pattern));
646 646
             }
647 647
         }
648 648
 
@@ -656,16 +656,16 @@  discard block
 block discarded – undo
656 656
             // Remove all items in $todelete from deleted_occurences
657 657
             $new = Array();
658 658
 
659
-            foreach($this->recur["deleted_occurences"] as $entry) {
660
-                if($entry != $base_date)
659
+            foreach ($this->recur["deleted_occurences"] as $entry) {
660
+                if ($entry != $base_date)
661 661
                     $new[] = $entry;
662 662
             }
663 663
             $this->recur["deleted_occurences"] = $new;
664 664
 
665 665
             $new = Array();
666 666
 
667
-            foreach($this->recur["changed_occurences"] as $entry) {
668
-                if(!$this->isSameDay($entry["basedate"], $base_date))
667
+            foreach ($this->recur["changed_occurences"] as $entry) {
668
+                if (!$this->isSameDay($entry["basedate"], $base_date))
669 669
                     $new[] = $entry;
670 670
                 else
671 671
                     $this->deleteExceptionAttachment($this->toGMT($this->tz, $base_date + $this->recur["startocc"] * 60));
@@ -696,15 +696,15 @@  discard block
 block discarded – undo
696 696
               $props[PR_EXCEPTION_ENDTIME] = $this->fromGMT($this->tz, $exception_props[$this->proptags["duedate"]]);
697 697
               mapi_setprops($attachment, $props);
698 698
 
699
-            $imessage = mapi_attach_openobj($attachment, MAPI_CREATE | MAPI_MODIFY);
699
+            $imessage = mapi_attach_openobj($attachment, MAPI_CREATE|MAPI_MODIFY);
700 700
 
701 701
             if ($copy_attach_from) {
702 702
                 $attachmentTable = mapi_message_getattachmenttable($copy_attach_from);
703
-                if($attachmentTable) {
703
+                if ($attachmentTable) {
704 704
                     $attachments = mapi_table_queryallrows($attachmentTable, array(PR_ATTACH_NUM, PR_ATTACH_SIZE, PR_ATTACH_LONG_FILENAME, PR_ATTACHMENT_HIDDEN, PR_DISPLAY_NAME, PR_ATTACH_METHOD));
705 705
 
706
-                    foreach($attachments as $attach_props){
707
-                        $attach_old = mapi_message_openattach($copy_attach_from, (int) $attach_props[PR_ATTACH_NUM]);
706
+                    foreach ($attachments as $attach_props) {
707
+                        $attach_old = mapi_message_openattach($copy_attach_from, (int)$attach_props[PR_ATTACH_NUM]);
708 708
                         $attach_newResourceMsg = mapi_message_createattach($imessage);
709 709
                         mapi_copyto($attach_old, array(), array(), $attach_newResourceMsg, 0);
710 710
                         mapi_savechanges($attach_newResourceMsg);
@@ -718,8 +718,8 @@  discard block
 block discarded – undo
718 718
             // of an exception. This is only a quickfix as it is not yet possible
719 719
             // to change an existing exception.
720 720
             // remove mv properties when needed
721
-            foreach($props as $propTag=>$propVal){
722
-                if ((mapi_prop_type($propTag) & MV_FLAG) == MV_FLAG && is_null($propVal)){
721
+            foreach ($props as $propTag=>$propVal) {
722
+                if ((mapi_prop_type($propTag) & MV_FLAG) == MV_FLAG && is_null($propVal)) {
723 723
                     unset($props[$propTag]);
724 724
                 }
725 725
             }
@@ -743,14 +743,14 @@  discard block
 block discarded – undo
743 743
             $attachments = mapi_message_getattachmenttable($this->message);
744 744
             $attachTable = mapi_table_queryallrows($attachments, Array(PR_ATTACH_NUM));
745 745
 
746
-            foreach($attachTable as $attachRow)
746
+            foreach ($attachTable as $attachRow)
747 747
             {
748 748
                 $tempattach = mapi_message_openattach($this->message, $attachRow[PR_ATTACH_NUM]);
749 749
                 $exception = mapi_attach_openobj($tempattach);
750 750
 
751 751
                   $data = mapi_message_getprops($exception, array($this->proptags["basedate"]));
752 752
 
753
-                  if($this->dayStartOf($this->fromGMT($this->tz, $data[$this->proptags["basedate"]])) == $this->dayStartOf($base_date)) {
753
+                  if ($this->dayStartOf($this->fromGMT($this->tz, $data[$this->proptags["basedate"]])) == $this->dayStartOf($base_date)) {
754 754
                       mapi_message_deleteattach($this->message, $attachRow[PR_ATTACH_NUM]);
755 755
                   }
756 756
             }
@@ -764,9 +764,9 @@  discard block
 block discarded – undo
764 764
             $attachments = mapi_message_getattachmenttable($this->message);
765 765
             $attachTable = mapi_table_queryallrows($attachments, Array(PR_ATTACH_NUM, PR_ATTACHMENT_HIDDEN));
766 766
 
767
-            foreach($attachTable as $attachRow)
767
+            foreach ($attachTable as $attachRow)
768 768
             {
769
-                if(isset($attachRow[PR_ATTACHMENT_HIDDEN]) && $attachRow[PR_ATTACHMENT_HIDDEN]) {
769
+                if (isset($attachRow[PR_ATTACHMENT_HIDDEN]) && $attachRow[PR_ATTACHMENT_HIDDEN]) {
770 770
                     mapi_message_deleteattach($this->message, $attachRow[PR_ATTACH_NUM]);
771 771
                 }
772 772
             }
@@ -792,21 +792,21 @@  discard block
 block discarded – undo
792 792
             $attachments = mapi_message_getattachmenttable($this->message);
793 793
             $attachRows = mapi_table_queryallrows($attachments, Array(PR_ATTACH_NUM), $attach_res);
794 794
 
795
-            if(is_array($attachRows)) {
796
-                foreach($attachRows as $attachRow)
795
+            if (is_array($attachRows)) {
796
+                foreach ($attachRows as $attachRow)
797 797
                 {
798 798
                     $tempattach = mapi_message_openattach($this->message, $attachRow[PR_ATTACH_NUM]);
799 799
                     $exception = mapi_attach_openobj($tempattach);
800 800
 
801 801
                     $data = mapi_message_getprops($exception, array($this->proptags["basedate"]));
802 802
 
803
-                    if(!isset($data[$this->proptags["basedate"]])) {
803
+                    if (!isset($data[$this->proptags["basedate"]])) {
804 804
                         // if no basedate found then it could be embedded message so ignore it
805 805
                         // we need proper restriction to exclude embedded messages as well
806 806
                         continue;
807 807
                     }
808 808
 
809
-                    if($this->isSameDay($this->fromGMT($this->tz, $data[$this->proptags["basedate"]]), $base_date)) {
809
+                    if ($this->isSameDay($this->fromGMT($this->tz, $data[$this->proptags["basedate"]]), $base_date)) {
810 810
                         return $tempattach;
811 811
                     }
812 812
                 }
@@ -831,9 +831,9 @@  discard block
 block discarded – undo
831 831
         function processOccurrenceItem(&$items, $start, $end, $basedate, $startocc, $endocc, $tz, $reminderonly)
832 832
         {
833 833
             $exception = $this->isException($basedate);
834
-            if($exception){
834
+            if ($exception) {
835 835
                 return false;
836
-            }else{
836
+            } else {
837 837
                 $occstart = $basedate + $startocc * 60;
838 838
                 $occend = $basedate + $endocc * 60;
839 839
 
@@ -849,7 +849,7 @@  discard block
 block discarded – undo
849 849
                  * starts at 00:00 and ends on 00:00. if it is so, then process
850 850
                  * the occurrence and send it in response.
851 851
                  */
852
-                if(($occstart  >= $end || $occend <=  $start) && !($occstart == $occend && $occstart == $start))
852
+                if (($occstart >= $end || $occend <= $start) && !($occstart == $occend && $occstart == $start))
853 853
                     return;
854 854
 
855 855
                 // Properties for this occurrence are the same as the main object,
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
             }
864 864
 
865 865
             // If reminderonly is set, only add reminders
866
-            if($reminderonly && (!isset($newitem[$this->proptags["reminder"]]) || $newitem[$this->proptags["reminder"]] == false))
866
+            if ($reminderonly && (!isset($newitem[$this->proptags["reminder"]]) || $newitem[$this->proptags["reminder"]] == false))
867 867
                 return;
868 868
 
869 869
             $items[] = $newitem;
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
         function processExceptionItems(&$items, $start, $end)
879 879
         {
880 880
             $limit = 0;
881
-            foreach($this->recur["changed_occurences"] as $exception) {
881
+            foreach ($this->recur["changed_occurences"] as $exception) {
882 882
 
883 883
                 // Convert to GMT
884 884
                 $occstart = $this->toGMT($this->tz, $exception["start"]);
@@ -886,11 +886,11 @@  discard block
 block discarded – undo
886 886
 
887 887
                 // Check range criterium. Exact matches (eg when $occstart == $end), do NOT match since you cannot
888 888
                 // see any part of the appointment. Partial overlaps DO match.
889
-                if($occstart >= $end || $occend <= $start)
889
+                if ($occstart >= $end || $occend <= $start)
890 890
                     continue;
891 891
 
892 892
                 array_push($items, $this->getExceptionProperties($exception));
893
-                if((count($items) == $limit))
893
+                if ((count($items) == $limit))
894 894
                     break;
895 895
                 }
896 896
         }
@@ -902,10 +902,10 @@  discard block
 block discarded – undo
902 902
          */
903 903
         function isException($basedate)
904 904
         {
905
-            if($this->isDeleteException($basedate))
905
+            if ($this->isDeleteException($basedate))
906 906
                 return true;
907 907
 
908
-            if($this->getChangeException($basedate) != false)
908
+            if ($this->getChangeException($basedate) != false)
909 909
                 return true;
910 910
 
911 911
             return false;
@@ -917,9 +917,9 @@  discard block
 block discarded – undo
917 917
         function isDeleteException($basedate)
918 918
         {
919 919
             // Check if the occurrence is deleted on the specified date
920
-            foreach($this->recur["deleted_occurences"] as $deleted)
920
+            foreach ($this->recur["deleted_occurences"] as $deleted)
921 921
             {
922
-                if($this->isSameDay($deleted, $basedate))
922
+                if ($this->isSameDay($deleted, $basedate))
923 923
                     return true;
924 924
             }
925 925
 
@@ -932,9 +932,9 @@  discard block
 block discarded – undo
932 932
         function getChangeException($basedate)
933 933
         {
934 934
             // Check if the occurrence is modified on the specified date
935
-            foreach($this->recur["changed_occurences"] as $changed)
935
+            foreach ($this->recur["changed_occurences"] as $changed)
936 936
             {
937
-                if($this->isSameDay($changed["basedate"], $basedate))
937
+                if ($this->isSameDay($changed["basedate"], $basedate))
938 938
                     return $changed;
939 939
             }
940 940
 
@@ -975,31 +975,31 @@  discard block
 block discarded – undo
975 975
             $item[$this->proptags["commonstart"]] = $item[$this->proptags["startdate"]];
976 976
             $item[$this->proptags["commonend"]] = $item[$this->proptags["duedate"]];
977 977
 
978
-            if(isset($exception["subject"])) {
978
+            if (isset($exception["subject"])) {
979 979
                 $item[$this->proptags["subject"]] = $exception["subject"];
980 980
             }
981 981
 
982
-            if(isset($exception["label"])) {
982
+            if (isset($exception["label"])) {
983 983
                 $item[$this->proptags["label"]] = $exception["label"];
984 984
             }
985 985
 
986
-            if(isset($exception["alldayevent"])) {
986
+            if (isset($exception["alldayevent"])) {
987 987
                 $item[$this->proptags["alldayevent"]] = $exception["alldayevent"];
988 988
             }
989 989
 
990
-            if(isset($exception["location"])) {
990
+            if (isset($exception["location"])) {
991 991
                 $item[$this->proptags["location"]] = $exception["location"];
992 992
             }
993 993
 
994
-            if(isset($exception["remind_before"])) {
994
+            if (isset($exception["remind_before"])) {
995 995
                 $item[$this->proptags["reminder_minutes"]] = $exception["remind_before"];
996 996
             }
997 997
 
998
-            if(isset($exception["reminder_set"])) {
998
+            if (isset($exception["reminder_set"])) {
999 999
                 $item[$this->proptags["reminder"]] = $exception["reminder_set"];
1000 1000
             }
1001 1001
 
1002
-            if(isset($exception["busystatus"])) {
1002
+            if (isset($exception["busystatus"])) {
1003 1003
                 $item[$this->proptags["busystatus"]] = $exception["busystatus"];
1004 1004
             }
1005 1005
 
@@ -1057,19 +1057,19 @@  discard block
 block discarded – undo
1057 1057
 
1058 1058
             // Add organizer to meeting only if it is not organized.
1059 1059
             $msgprops = mapi_getprops($exception, array(PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_ADDRTYPE, PR_SENT_REPRESENTING_SEARCH_KEY, $this->proptags['responsestatus']));
1060
-            if (isset($msgprops[$this->proptags['responsestatus']]) && $msgprops[$this->proptags['responsestatus']] != olResponseOrganized){
1060
+            if (isset($msgprops[$this->proptags['responsestatus']]) && $msgprops[$this->proptags['responsestatus']] != olResponseOrganized) {
1061 1061
                 $this->addOrganizer($msgprops, $exception_recips['add']);
1062 1062
             }
1063 1063
 
1064 1064
             // Remove all deleted recipients
1065 1065
             if (isset($exception_recips['remove'])) {
1066 1066
                 foreach ($exception_recips['remove'] as &$recip) {
1067
-                    if (!isset($recip[PR_RECIPIENT_FLAGS]) || $recip[PR_RECIPIENT_FLAGS] != (recipReserved | recipExceptionalDeleted | recipSendable)) {
1068
-                        $recip[PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalDeleted;
1067
+                    if (!isset($recip[PR_RECIPIENT_FLAGS]) || $recip[PR_RECIPIENT_FLAGS] != (recipReserved|recipExceptionalDeleted|recipSendable)) {
1068
+                        $recip[PR_RECIPIENT_FLAGS] = recipSendable|recipExceptionalDeleted;
1069 1069
                     } else {
1070
-                        $recip[PR_RECIPIENT_FLAGS] = recipReserved | recipExceptionalDeleted | recipSendable;
1070
+                        $recip[PR_RECIPIENT_FLAGS] = recipReserved|recipExceptionalDeleted|recipSendable;
1071 1071
                     }
1072
-                    $recip[PR_RECIPIENT_TRACKSTATUS] = olResponseNone;        // No Response required
1072
+                    $recip[PR_RECIPIENT_TRACKSTATUS] = olResponseNone; // No Response required
1073 1073
                 }
1074 1074
                 unset($recip);
1075 1075
                 mapi_message_modifyrecipients($exception, MODRECIP_MODIFY, $exception_recips['remove']);
@@ -1112,14 +1112,14 @@  discard block
 block discarded – undo
1112 1112
 
1113 1113
             // Add organizer to meeting only if it is not organized.
1114 1114
             $msgprops = mapi_getprops($message, array(PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_ADDRTYPE, PR_SENT_REPRESENTING_SEARCH_KEY, $this->proptags['responsestatus']));
1115
-            if (isset($msgprops[$this->proptags['responsestatus']]) && $msgprops[$this->proptags['responsestatus']] != olResponseOrganized){
1115
+            if (isset($msgprops[$this->proptags['responsestatus']]) && $msgprops[$this->proptags['responsestatus']] != olResponseOrganized) {
1116 1116
                 $this->addOrganizer($msgprops, $exception_recips);
1117 1117
             }
1118 1118
 
1119 1119
             if (!empty($exception_recips)) {
1120
-                foreach($recipientRows as $key => $recipient) {
1120
+                foreach ($recipientRows as $key => $recipient) {
1121 1121
                     $found = false;
1122
-                    foreach($exception_recips as $excep_recip) {
1122
+                    foreach ($exception_recips as $excep_recip) {
1123 1123
                         if (isset($recipient[PR_SEARCH_KEY], $excep_recip[PR_SEARCH_KEY]) && $recipient[PR_SEARCH_KEY] == $excep_recip[PR_SEARCH_KEY])
1124 1124
                             $found = true;
1125 1125
                     }
@@ -1128,8 +1128,8 @@  discard block
 block discarded – undo
1128 1128
                        $foundInDeletedRecipients = false;
1129 1129
                        // Look if the $recipient is in the list of deleted recipients
1130 1130
                        if (!empty($deletedRecipients)) {
1131
-                               foreach($deletedRecipients as $recip) {
1132
-                                   if ($recip[PR_SEARCH_KEY] == $recipient[PR_SEARCH_KEY]){
1131
+                               foreach ($deletedRecipients as $recip) {
1132
+                                   if ($recip[PR_SEARCH_KEY] == $recipient[PR_SEARCH_KEY]) {
1133 1133
                                        $foundInDeletedRecipients = true;
1134 1134
                                        break;
1135 1135
                                    }
@@ -1138,12 +1138,12 @@  discard block
 block discarded – undo
1138 1138
 
1139 1139
                        // If recipient is not in list of deleted recipient, add him
1140 1140
                        if (!$foundInDeletedRecipients) {
1141
-                            if (!isset($recipient[PR_RECIPIENT_FLAGS]) || $recipient[PR_RECIPIENT_FLAGS] != (recipReserved | recipExceptionalDeleted | recipSendable)) {
1142
-                                $recipient[PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalDeleted;
1141
+                            if (!isset($recipient[PR_RECIPIENT_FLAGS]) || $recipient[PR_RECIPIENT_FLAGS] != (recipReserved|recipExceptionalDeleted|recipSendable)) {
1142
+                                $recipient[PR_RECIPIENT_FLAGS] = recipSendable|recipExceptionalDeleted;
1143 1143
                             } else {
1144
-                                $recipient[PR_RECIPIENT_FLAGS] = recipReserved | recipExceptionalDeleted | recipSendable;
1144
+                                $recipient[PR_RECIPIENT_FLAGS] = recipReserved|recipExceptionalDeleted|recipSendable;
1145 1145
                             }
1146
-                            $recipient[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone;    // No Response required
1146
+                            $recipient[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone; // No Response required
1147 1147
                             $deletedRecipients[] = $recipient;
1148 1148
                         }
1149 1149
                     }
@@ -1180,7 +1180,7 @@  discard block
 block discarded – undo
1180 1180
             $result = false;
1181 1181
             if (!empty($this->recur["changed_occurences"])) {
1182 1182
                 $result = array();
1183
-                foreach($this->recur["changed_occurences"] as $exception) {
1183
+                foreach ($this->recur["changed_occurences"] as $exception) {
1184 1184
                     $result[] = $exception["basedate"];
1185 1185
                 }
1186 1186
                 return $result;
@@ -1200,16 +1200,16 @@  discard block
 block discarded – undo
1200 1200
         {
1201 1201
             $hasOrganizer = false;
1202 1202
             // Check if meeting already has an organizer.
1203
-            foreach ($recipients as $key => $recipient){
1204
-                if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable | recipOrganizer)) {
1203
+            foreach ($recipients as $key => $recipient) {
1204
+                if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable|recipOrganizer)) {
1205 1205
                     $hasOrganizer = true;
1206
-                } else if ($isException && !isset($recipient[PR_RECIPIENT_FLAGS])){
1206
+                } else if ($isException && !isset($recipient[PR_RECIPIENT_FLAGS])) {
1207 1207
                     // Recipients for an occurrence
1208
-                    $recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalResponse;
1208
+                    $recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable|recipExceptionalResponse;
1209 1209
                 }
1210 1210
             }
1211 1211
 
1212
-            if (!$hasOrganizer){
1212
+            if (!$hasOrganizer) {
1213 1213
                 // Create organizer.
1214 1214
                 $organizer = array();
1215 1215
                 $organizer[PR_ENTRYID] = $messageProps[PR_SENT_REPRESENTING_ENTRYID];
@@ -1217,9 +1217,9 @@  discard block
 block discarded – undo
1217 1217
                 $organizer[PR_EMAIL_ADDRESS] = $messageProps[PR_SENT_REPRESENTING_EMAIL_ADDRESS];
1218 1218
                 $organizer[PR_RECIPIENT_TYPE] = MAPI_TO;
1219 1219
                 $organizer[PR_RECIPIENT_DISPLAY_NAME] = $messageProps[PR_SENT_REPRESENTING_NAME];
1220
-                $organizer[PR_ADDRTYPE] = empty($messageProps[PR_SENT_REPRESENTING_ADDRTYPE])?'SMTP':$messageProps[PR_SENT_REPRESENTING_ADDRTYPE];
1220
+                $organizer[PR_ADDRTYPE] = empty($messageProps[PR_SENT_REPRESENTING_ADDRTYPE]) ? 'SMTP' : $messageProps[PR_SENT_REPRESENTING_ADDRTYPE];
1221 1221
                 $organizer[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone;
1222
-                $organizer[PR_RECIPIENT_FLAGS] = recipSendable | recipOrganizer;
1222
+                $organizer[PR_RECIPIENT_FLAGS] = recipSendable|recipOrganizer;
1223 1223
                 $organizer[PR_SEARCH_KEY] = $messageProps[PR_SENT_REPRESENTING_SEARCH_KEY];
1224 1224
 
1225 1225
                 // Add organizer to recipients list.
Please login to merge, or discard this patch.
Braces   +65 added lines, -45 removed lines patch added patch discarded remove patch
@@ -124,8 +124,9 @@  discard block
 block discarded – undo
124 124
                 }
125 125
                 // Properties in the attachment are the properties of the base object, plus $exception_props plus the base date
126 126
                 foreach (array("subject", "location", "label", "reminder", "reminder_minutes", "alldayevent", "busystatus") as $propname) {
127
-                    if(isset($this->messageprops[$this->proptags[$propname]]))
128
-                        $props[$this->proptags[$propname]] = $this->messageprops[$this->proptags[$propname]];
127
+                    if(isset($this->messageprops[$this->proptags[$propname]])) {
128
+                                            $props[$this->proptags[$propname]] = $this->messageprops[$this->proptags[$propname]];
129
+                    }
129 130
                 }
130 131
 
131 132
                 $props[PR_MESSAGE_CLASS] = "IPM.OLE.CLASS.{00061055-0000-0000-C000-000000000046}";
@@ -220,12 +221,14 @@  discard block
 block discarded – undo
220 221
             $extomodify = false;
221 222
 
222 223
             for($i = 0, $len = count($this->recur["changed_occurences"]); $i < $len; $i++) {
223
-                if($this->isSameDay($this->recur["changed_occurences"][$i]["basedate"], $baseday))
224
-                    $extomodify = &$this->recur["changed_occurences"][$i];
224
+                if($this->isSameDay($this->recur["changed_occurences"][$i]["basedate"], $baseday)) {
225
+                                    $extomodify = &$this->recur["changed_occurences"][$i];
226
+                }
225 227
             }
226 228
 
227
-            if(!$extomodify)
228
-                return false;
229
+            if(!$extomodify) {
230
+                            return false;
231
+            }
229 232
 
230 233
             // remove basedate property as we want to preserve the old value
231 234
             // client will send basedate with time part as zero, so discard that value
@@ -339,10 +342,11 @@  discard block
 block discarded – undo
339 342
             $startday = $this->dayStartOf($start);
340 343
 
341 344
             // Get all the occurrences on the days between the basedate (may be reversed)
342
-            if($prevday < $startday)
343
-                $items = $this->getItems($this->toGMT($this->tz, $prevday), $this->toGMT($this->tz, $startday + 24 * 60 * 60));
344
-            else
345
-                $items = $this->getItems($this->toGMT($this->tz, $startday), $this->toGMT($this->tz, $prevday + 24 * 60 * 60));
345
+            if($prevday < $startday) {
346
+                            $items = $this->getItems($this->toGMT($this->tz, $prevday), $this->toGMT($this->tz, $startday + 24 * 60 * 60));
347
+            } else {
348
+                            $items = $this->getItems($this->toGMT($this->tz, $startday), $this->toGMT($this->tz, $prevday + 24 * 60 * 60));
349
+            }
346 350
 
347 351
             // There should now be exactly one item, namely the item that we are modifying. If there are any other items in the range,
348 352
             // then we abort the change, since one of the rules has been violated.
@@ -371,8 +375,9 @@  discard block
 block discarded – undo
371 375
                 $previousitem_startdate = $occitems[count($occitems) - 1][$this->proptags["startdate"]];
372 376
 
373 377
                 // if our reminder is set before or equal to the beginning of the previous occurrence, then that's not allowed
374
-                if($startdate - ($reminderminutes*60) <= $previousitem_startdate)
375
-                    return false;
378
+                if($startdate - ($reminderminutes*60) <= $previousitem_startdate) {
379
+                                    return false;
380
+                }
376 381
             }
377 382
 
378 383
             // Get the endtime of the current occurrence and find the next two occurrences (including the current occurrence)
@@ -385,8 +390,9 @@  discard block
 block discarded – undo
385 390
                 // Get reminder time of the next occurrence.
386 391
                 $nextOccReminderTime = $next[$this->proptags["startdate"]] - ($next[$this->proptags["reminder_minutes"]] * 60);
387 392
                 // If the reminder time of the next item is before the start of this item, then that's not allowed
388
-                if($nextOccReminderTime <= $startdate)
389
-                    return false;
393
+                if($nextOccReminderTime <= $startdate) {
394
+                                    return false;
395
+                }
390 396
             }
391 397
 
392 398
             // All was ok
@@ -396,16 +402,19 @@  discard block
 block discarded – undo
396 402
         function setRecurrence($tz, $recur)
397 403
         {
398 404
             // only reset timezone if specified
399
-            if($tz)
400
-                $this->tz = $tz;
405
+            if($tz) {
406
+                            $this->tz = $tz;
407
+            }
401 408
 
402 409
             $this->recur = $recur;
403 410
 
404
-            if(!isset($this->recur["changed_occurences"]))
405
-                $this->recur["changed_occurences"] = Array();
411
+            if(!isset($this->recur["changed_occurences"])) {
412
+                            $this->recur["changed_occurences"] = Array();
413
+            }
406 414
 
407
-            if(!isset($this->recur["deleted_occurences"]))
408
-                $this->recur["deleted_occurences"] = Array();
415
+            if(!isset($this->recur["deleted_occurences"])) {
416
+                            $this->recur["deleted_occurences"] = Array();
417
+            }
409 418
 
410 419
             $this->deleteAttachments();
411 420
             $this->saveRecurrence();
@@ -657,18 +666,20 @@  discard block
 block discarded – undo
657 666
             $new = Array();
658 667
 
659 668
             foreach($this->recur["deleted_occurences"] as $entry) {
660
-                if($entry != $base_date)
661
-                    $new[] = $entry;
669
+                if($entry != $base_date) {
670
+                                    $new[] = $entry;
671
+                }
662 672
             }
663 673
             $this->recur["deleted_occurences"] = $new;
664 674
 
665 675
             $new = Array();
666 676
 
667 677
             foreach($this->recur["changed_occurences"] as $entry) {
668
-                if(!$this->isSameDay($entry["basedate"], $base_date))
669
-                    $new[] = $entry;
670
-                else
671
-                    $this->deleteExceptionAttachment($this->toGMT($this->tz, $base_date + $this->recur["startocc"] * 60));
678
+                if(!$this->isSameDay($entry["basedate"], $base_date)) {
679
+                                    $new[] = $entry;
680
+                } else {
681
+                                    $this->deleteExceptionAttachment($this->toGMT($this->tz, $base_date + $this->recur["startocc"] * 60));
682
+                }
672 683
             }
673 684
 
674 685
             $this->recur["changed_occurences"] = $new;
@@ -833,7 +844,7 @@  discard block
 block discarded – undo
833 844
             $exception = $this->isException($basedate);
834 845
             if($exception){
835 846
                 return false;
836
-            }else{
847
+            } else{
837 848
                 $occstart = $basedate + $startocc * 60;
838 849
                 $occend = $basedate + $endocc * 60;
839 850
 
@@ -849,8 +860,9 @@  discard block
 block discarded – undo
849 860
                  * starts at 00:00 and ends on 00:00. if it is so, then process
850 861
                  * the occurrence and send it in response.
851 862
                  */
852
-                if(($occstart  >= $end || $occend <=  $start) && !($occstart == $occend && $occstart == $start))
853
-                    return;
863
+                if(($occstart  >= $end || $occend <=  $start) && !($occstart == $occend && $occstart == $start)) {
864
+                                    return;
865
+                }
854 866
 
855 867
                 // Properties for this occurrence are the same as the main object,
856 868
                 // With these properties overridden
@@ -863,8 +875,9 @@  discard block
 block discarded – undo
863 875
             }
864 876
 
865 877
             // If reminderonly is set, only add reminders
866
-            if($reminderonly && (!isset($newitem[$this->proptags["reminder"]]) || $newitem[$this->proptags["reminder"]] == false))
867
-                return;
878
+            if($reminderonly && (!isset($newitem[$this->proptags["reminder"]]) || $newitem[$this->proptags["reminder"]] == false)) {
879
+                            return;
880
+            }
868 881
 
869 882
             $items[] = $newitem;
870 883
         }
@@ -886,12 +899,14 @@  discard block
 block discarded – undo
886 899
 
887 900
                 // Check range criterium. Exact matches (eg when $occstart == $end), do NOT match since you cannot
888 901
                 // see any part of the appointment. Partial overlaps DO match.
889
-                if($occstart >= $end || $occend <= $start)
890
-                    continue;
902
+                if($occstart >= $end || $occend <= $start) {
903
+                                    continue;
904
+                }
891 905
 
892 906
                 array_push($items, $this->getExceptionProperties($exception));
893
-                if((count($items) == $limit))
894
-                    break;
907
+                if((count($items) == $limit)) {
908
+                                    break;
909
+                }
895 910
                 }
896 911
         }
897 912
 
@@ -902,11 +917,13 @@  discard block
 block discarded – undo
902 917
          */
903 918
         function isException($basedate)
904 919
         {
905
-            if($this->isDeleteException($basedate))
906
-                return true;
920
+            if($this->isDeleteException($basedate)) {
921
+                            return true;
922
+            }
907 923
 
908
-            if($this->getChangeException($basedate) != false)
909
-                return true;
924
+            if($this->getChangeException($basedate) != false) {
925
+                            return true;
926
+            }
910 927
 
911 928
             return false;
912 929
         }
@@ -919,8 +936,9 @@  discard block
 block discarded – undo
919 936
             // Check if the occurrence is deleted on the specified date
920 937
             foreach($this->recur["deleted_occurences"] as $deleted)
921 938
             {
922
-                if($this->isSameDay($deleted, $basedate))
923
-                    return true;
939
+                if($this->isSameDay($deleted, $basedate)) {
940
+                                    return true;
941
+                }
924 942
             }
925 943
 
926 944
             return false;
@@ -934,8 +952,9 @@  discard block
 block discarded – undo
934 952
             // Check if the occurrence is modified on the specified date
935 953
             foreach($this->recur["changed_occurences"] as $changed)
936 954
             {
937
-                if($this->isSameDay($changed["basedate"], $basedate))
938
-                    return $changed;
955
+                if($this->isSameDay($changed["basedate"], $basedate)) {
956
+                                    return $changed;
957
+                }
939 958
             }
940 959
 
941 960
             return false;
@@ -1120,8 +1139,9 @@  discard block
 block discarded – undo
1120 1139
                 foreach($recipientRows as $key => $recipient) {
1121 1140
                     $found = false;
1122 1141
                     foreach($exception_recips as $excep_recip) {
1123
-                        if (isset($recipient[PR_SEARCH_KEY], $excep_recip[PR_SEARCH_KEY]) && $recipient[PR_SEARCH_KEY] == $excep_recip[PR_SEARCH_KEY])
1124
-                            $found = true;
1142
+                        if (isset($recipient[PR_SEARCH_KEY], $excep_recip[PR_SEARCH_KEY]) && $recipient[PR_SEARCH_KEY] == $excep_recip[PR_SEARCH_KEY]) {
1143
+                                                    $found = true;
1144
+                        }
1125 1145
                     }
1126 1146
 
1127 1147
                     if (!$found) {
Please login to merge, or discard this patch.
mapi/mapiguid.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -5,30 +5,30 @@
 block discarded – undo
5 5
  * SPDX-FileCopyrightText: Copyright 2020-2022 grommunio GmbH
6 6
  */
7 7
 
8
-define('IID_IStream',                           makeguid("{0000000c-0000-0000-c000-000000000046}"));
9
-define('IID_IMAPITable',                        makeguid("{00020301-0000-0000-c000-000000000046}"));
10
-define('IID_IMessage',                          makeguid("{00020307-0000-0000-c000-000000000046}"));
11
-define('IID_IExchangeExportChanges',            makeguid("{a3ea9cc0-d1b2-11cd-80fc-00aa004bba0b}"));
12
-define('IID_IExchangeImportContentsChanges',    makeguid("{f75abfa0-d0e0-11cd-80fc-00aa004bba0b}"));
13
-define('IID_IExchangeImportHierarchyChanges',   makeguid("{85a66cf0-d0e0-11cd-80fc-00aa004bba0b}"));
8
+define('IID_IStream', makeguid("{0000000c-0000-0000-c000-000000000046}"));
9
+define('IID_IMAPITable', makeguid("{00020301-0000-0000-c000-000000000046}"));
10
+define('IID_IMessage', makeguid("{00020307-0000-0000-c000-000000000046}"));
11
+define('IID_IExchangeExportChanges', makeguid("{a3ea9cc0-d1b2-11cd-80fc-00aa004bba0b}"));
12
+define('IID_IExchangeImportContentsChanges', makeguid("{f75abfa0-d0e0-11cd-80fc-00aa004bba0b}"));
13
+define('IID_IExchangeImportHierarchyChanges', makeguid("{85a66cf0-d0e0-11cd-80fc-00aa004bba0b}"));
14 14
 
15
-define('PSETID_Appointment',                    makeguid("{00062002-0000-0000-C000-000000000046}"));
16
-define('PSETID_Task',                           makeguid("{00062003-0000-0000-C000-000000000046}"));
17
-define('PSETID_Address',                        makeguid("{00062004-0000-0000-C000-000000000046}"));
18
-define('PSETID_Common',                         makeguid("{00062008-0000-0000-C000-000000000046}"));
19
-define('PSETID_Log',                            makeguid("{0006200A-0000-0000-C000-000000000046}"));
20
-define('PSETID_Note',                           makeguid("{0006200E-0000-0000-C000-000000000046}"));
21
-define('PSETID_Meeting',                        makeguid("{6ED8DA90-450B-101B-98DA-00AA003F1305}"));
22
-define('PSETID_Archive',                        makeguid("{72E98EBC-57D2-4AB5-B0AA-D50A7B531CB9}"));
15
+define('PSETID_Appointment', makeguid("{00062002-0000-0000-C000-000000000046}"));
16
+define('PSETID_Task', makeguid("{00062003-0000-0000-C000-000000000046}"));
17
+define('PSETID_Address', makeguid("{00062004-0000-0000-C000-000000000046}"));
18
+define('PSETID_Common', makeguid("{00062008-0000-0000-C000-000000000046}"));
19
+define('PSETID_Log', makeguid("{0006200A-0000-0000-C000-000000000046}"));
20
+define('PSETID_Note', makeguid("{0006200E-0000-0000-C000-000000000046}"));
21
+define('PSETID_Meeting', makeguid("{6ED8DA90-450B-101B-98DA-00AA003F1305}"));
22
+define('PSETID_Archive', makeguid("{72E98EBC-57D2-4AB5-B0AA-D50A7B531CB9}"));
23 23
 
24
-define('PS_MAPI',                               makeguid("{00020328-0000-0000-C000-000000000046}"));
25
-define('PS_PUBLIC_STRINGS',                     makeguid("{00020329-0000-0000-C000-000000000046}"));
26
-define('PS_INTERNET_HEADERS',                   makeguid("{00020386-0000-0000-c000-000000000046}"));
24
+define('PS_MAPI', makeguid("{00020328-0000-0000-C000-000000000046}"));
25
+define('PS_PUBLIC_STRINGS', makeguid("{00020329-0000-0000-C000-000000000046}"));
26
+define('PS_INTERNET_HEADERS', makeguid("{00020386-0000-0000-c000-000000000046}"));
27 27
 
28
-define('MUIDECSAB',                             makeguid("{50A921AC-D340-48ee-B319-FBA753304425}"));
28
+define('MUIDECSAB', makeguid("{50A921AC-D340-48ee-B319-FBA753304425}"));
29 29
 
30 30
 // grommunio Contact Provider GUIDs
31
-define('MUIDZCSAB',                             makeguid("{30047F72-92E3-DA4F-B86A-E52A7FE46571}"));
31
+define('MUIDZCSAB', makeguid("{30047F72-92E3-DA4F-B86A-E52A7FE46571}"));
32 32
 
33 33
 // sk added for grommunio-sync
34
-define ('PSETID_AirSync',                       makeguid("{71035549-0739-4DCB-9163-00F0580DBBDF}"));
34
+define('PSETID_AirSync', makeguid("{71035549-0739-4DCB-9163-00F0580DBBDF}"));
Please login to merge, or discard this patch.
mapi/mapitags.php 2 patches
Spacing   +626 added lines, -626 removed lines patch added patch discarded remove patch
@@ -8,191 +8,191 @@  discard block
 block discarded – undo
8 8
 if (!function_exists("mapi_prop_tag"))
9 9
     throw new FatalMisconfigurationException("PHP-MAPI extension is not available");
10 10
 
11
-define('PR_ACKNOWLEDGEMENT_MODE'                      ,mapi_prop_tag(PT_LONG,        0x0001));
12
-define('PR_ALTERNATE_RECIPIENT_ALLOWED'               ,mapi_prop_tag(PT_BOOLEAN,     0x0002));
13
-define('PR_AUTHORIZING_USERS'                         ,mapi_prop_tag(PT_BINARY,      0x0003));
14
-define('PR_AUTO_FORWARD_COMMENT'                      ,mapi_prop_tag(PT_TSTRING,     0x0004));
15
-define('PR_AUTO_FORWARDED'                            ,mapi_prop_tag(PT_BOOLEAN,     0x0005));
16
-define('PR_CONTENT_CONFIDENTIALITY_ALGORITHM_ID'      ,mapi_prop_tag(PT_BINARY,      0x0006));
17
-define('PR_CONTENT_CORRELATOR'                        ,mapi_prop_tag(PT_BINARY,      0x0007));
18
-define('PR_CONTENT_IDENTIFIER'                        ,mapi_prop_tag(PT_TSTRING,     0x0008));
19
-define('PR_CONTENT_LENGTH'                            ,mapi_prop_tag(PT_LONG,        0x0009));
20
-define('PR_CONTENT_RETURN_REQUESTED'                  ,mapi_prop_tag(PT_BOOLEAN,     0x000A));
21
-
22
-
23
-
24
-define('PR_CONVERSATION_KEY'                          ,mapi_prop_tag(PT_BINARY,      0x000B));
25
-
26
-define('PR_CONVERSION_EITS'                           ,mapi_prop_tag(PT_BINARY,      0x000C));
27
-define('PR_CONVERSION_WITH_LOSS_PROHIBITED'           ,mapi_prop_tag(PT_BOOLEAN,     0x000D));
28
-define('PR_CONVERTED_EITS'                            ,mapi_prop_tag(PT_BINARY,      0x000E));
29
-define('PR_DEFERRED_DELIVERY_TIME'                    ,mapi_prop_tag(PT_SYSTIME,     0x000F));
30
-define('PR_DEFERRED_SEND_TIME'                        ,mapi_prop_tag(PT_SYSTIME,     0x3FEF));
31
-define('PR_DELIVER_TIME'                              ,mapi_prop_tag(PT_SYSTIME,     0x0010));
32
-define('PR_DISCARD_REASON'                            ,mapi_prop_tag(PT_LONG,        0x0011));
33
-define('PR_DISCLOSURE_OF_RECIPIENTS'                  ,mapi_prop_tag(PT_BOOLEAN,     0x0012));
34
-define('PR_DL_EXPANSION_HISTORY'                      ,mapi_prop_tag(PT_BINARY,      0x0013));
35
-define('PR_DL_EXPANSION_PROHIBITED'                   ,mapi_prop_tag(PT_BOOLEAN,     0x0014));
36
-define('PR_EXPIRY_TIME'                               ,mapi_prop_tag(PT_SYSTIME,     0x0015));
37
-define('PR_IMPLICIT_CONVERSION_PROHIBITED'            ,mapi_prop_tag(PT_BOOLEAN,     0x0016));
38
-define('PR_IMPORTANCE'                                ,mapi_prop_tag(PT_LONG,        0x0017));
39
-define('PR_IPM_ID'                                    ,mapi_prop_tag(PT_BINARY,      0x0018));
40
-define('PR_LATEST_DELIVERY_TIME'                      ,mapi_prop_tag(PT_SYSTIME,     0x0019));
41
-define('PR_MESSAGE_CLASS'                             ,mapi_prop_tag(PT_TSTRING,     0x001A));
42
-define('PR_MESSAGE_DELIVERY_ID'                       ,mapi_prop_tag(PT_BINARY,      0x001B));
43
-
44
-
45
-
46
-
47
-
48
-define('PR_MESSAGE_SECURITY_LABEL'                    ,mapi_prop_tag(PT_BINARY,      0x001E));
49
-define('PR_OBSOLETED_IPMS'                            ,mapi_prop_tag(PT_BINARY,      0x001F));
50
-define('PR_ORIGINALLY_INTENDED_RECIPIENT_NAME'        ,mapi_prop_tag(PT_BINARY,      0x0020));
51
-define('PR_ORIGINAL_EITS'                             ,mapi_prop_tag(PT_BINARY,      0x0021));
52
-define('PR_ORIGINATOR_CERTIFICATE'                    ,mapi_prop_tag(PT_BINARY,      0x0022));
53
-define('PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED'      ,mapi_prop_tag(PT_BOOLEAN,     0x0023));
54
-define('PR_ORIGINATOR_RETURN_ADDRESS'                 ,mapi_prop_tag(PT_BINARY,      0x0024));
55
-
56
-define('PR_PARENT_KEY'                                ,mapi_prop_tag(PT_BINARY,      0x0025));
57
-define('PR_PRIORITY'                                  ,mapi_prop_tag(PT_LONG,        0x0026));
58
-
59
-define('PR_ORIGIN_CHECK'                              ,mapi_prop_tag(PT_BINARY,      0x0027));
60
-define('PR_PROOF_OF_SUBMISSION_REQUESTED'             ,mapi_prop_tag(PT_BOOLEAN,     0x0028));
61
-define('PR_READ_RECEIPT_REQUESTED'                    ,mapi_prop_tag(PT_BOOLEAN,     0x0029));
62
-define('PR_RECEIPT_TIME'                              ,mapi_prop_tag(PT_SYSTIME,     0x002A));
63
-define('PR_RECIPIENT_REASSIGNMENT_PROHIBITED'         ,mapi_prop_tag(PT_BOOLEAN,     0x002B));
64
-define('PR_REDIRECTION_HISTORY'                       ,mapi_prop_tag(PT_BINARY,      0x002C));
65
-define('PR_RELATED_IPMS'                              ,mapi_prop_tag(PT_BINARY,      0x002D));
66
-define('PR_ORIGINAL_SENSITIVITY'                      ,mapi_prop_tag(PT_LONG,        0x002E));
67
-define('PR_LANGUAGES'                                 ,mapi_prop_tag(PT_TSTRING,     0x002F));
68
-define('PR_REPLY_TIME'                                ,mapi_prop_tag(PT_SYSTIME,     0x0030));
69
-define('PR_REPORT_TAG'                                ,mapi_prop_tag(PT_BINARY,      0x0031));
70
-define('PR_REPORT_TIME'                               ,mapi_prop_tag(PT_SYSTIME,     0x0032));
71
-define('PR_RETURNED_IPM'                              ,mapi_prop_tag(PT_BOOLEAN,     0x0033));
72
-define('PR_SECURITY'                                  ,mapi_prop_tag(PT_LONG,        0x0034));
73
-define('PR_INCOMPLETE_COPY'                           ,mapi_prop_tag(PT_BOOLEAN,     0x0035));
74
-define('PR_SENSITIVITY'                               ,mapi_prop_tag(PT_LONG,        0x0036));
75
-define('PR_SUBJECT'                                   ,mapi_prop_tag(PT_TSTRING,     0x0037));
76
-define('PR_SUBJECT_IPM'                               ,mapi_prop_tag(PT_BINARY,      0x0038));
77
-define('PR_CLIENT_SUBMIT_TIME'                        ,mapi_prop_tag(PT_SYSTIME,     0x0039));
78
-define('PR_REPORT_NAME'                               ,mapi_prop_tag(PT_TSTRING,     0x003A));
79
-define('PR_SENT_REPRESENTING_SEARCH_KEY'              ,mapi_prop_tag(PT_BINARY,      0x003B));
80
-define('PR_X400_CONTENT_TYPE'                         ,mapi_prop_tag(PT_BINARY,      0x003C));
81
-define('PR_SUBJECT_PREFIX'                            ,mapi_prop_tag(PT_TSTRING,     0x003D));
82
-define('PR_NON_RECEIPT_REASON'                        ,mapi_prop_tag(PT_LONG,        0x003E));
83
-define('PR_RECEIVED_BY_ENTRYID'                       ,mapi_prop_tag(PT_BINARY,      0x003F));
84
-define('PR_RECEIVED_BY_NAME'                          ,mapi_prop_tag(PT_TSTRING,     0x0040));
85
-define('PR_SENT_REPRESENTING_ENTRYID'                 ,mapi_prop_tag(PT_BINARY,      0x0041));
86
-define('PR_SENT_REPRESENTING_NAME'                    ,mapi_prop_tag(PT_TSTRING,     0x0042));
87
-define('PR_RCVD_REPRESENTING_ENTRYID'                 ,mapi_prop_tag(PT_BINARY,      0x0043));
88
-define('PR_RCVD_REPRESENTING_NAME'                    ,mapi_prop_tag(PT_TSTRING,     0x0044));
89
-define('PR_REPORT_ENTRYID'                            ,mapi_prop_tag(PT_BINARY,      0x0045));
90
-define('PR_READ_RECEIPT_ENTRYID'                      ,mapi_prop_tag(PT_BINARY,      0x0046));
91
-define('PR_MESSAGE_SUBMISSION_ID'                     ,mapi_prop_tag(PT_BINARY,      0x0047));
92
-define('PR_PROVIDER_SUBMIT_TIME'                      ,mapi_prop_tag(PT_SYSTIME,     0x0048));
93
-define('PR_ORIGINAL_SUBJECT'                          ,mapi_prop_tag(PT_TSTRING,     0x0049));
94
-define('PR_DISC_VAL'                                  ,mapi_prop_tag(PT_BOOLEAN,     0x004A));
95
-define('PR_ORIG_MESSAGE_CLASS'                        ,mapi_prop_tag(PT_TSTRING,     0x004B));
96
-define('PR_ORIGINAL_AUTHOR_ENTRYID'                   ,mapi_prop_tag(PT_BINARY,      0x004C));
97
-define('PR_ORIGINAL_AUTHOR_NAME'                      ,mapi_prop_tag(PT_TSTRING,     0x004D));
98
-define('PR_ORIGINAL_SUBMIT_TIME'                      ,mapi_prop_tag(PT_SYSTIME,     0x004E));
99
-define('PR_REPLY_RECIPIENT_ENTRIES'                   ,mapi_prop_tag(PT_BINARY,      0x004F));
100
-define('PR_REPLY_RECIPIENT_NAMES'                     ,mapi_prop_tag(PT_TSTRING,     0x0050));
101
-
102
-define('PR_RECEIVED_BY_SEARCH_KEY'                    ,mapi_prop_tag(PT_BINARY,      0x0051));
103
-define('PR_RCVD_REPRESENTING_SEARCH_KEY'              ,mapi_prop_tag(PT_BINARY,      0x0052));
104
-define('PR_READ_RECEIPT_SEARCH_KEY'                   ,mapi_prop_tag(PT_BINARY,      0x0053));
105
-define('PR_REPORT_SEARCH_KEY'                         ,mapi_prop_tag(PT_BINARY,      0x0054));
106
-define('PR_ORIGINAL_DELIVERY_TIME'                    ,mapi_prop_tag(PT_SYSTIME,     0x0055));
107
-define('PR_ORIGINAL_AUTHOR_SEARCH_KEY'                ,mapi_prop_tag(PT_BINARY,      0x0056));
108
-
109
-define('PR_MESSAGE_TO_ME'                             ,mapi_prop_tag(PT_BOOLEAN,     0x0057));
110
-define('PR_MESSAGE_CC_ME'                             ,mapi_prop_tag(PT_BOOLEAN,     0x0058));
111
-define('PR_MESSAGE_RECIP_ME'                          ,mapi_prop_tag(PT_BOOLEAN,     0x0059));
112
-
113
-define('PR_ORIGINAL_SENDER_NAME'                      ,mapi_prop_tag(PT_TSTRING,     0x005A));
114
-define('PR_ORIGINAL_SENDER_ENTRYID'                   ,mapi_prop_tag(PT_BINARY,      0x005B));
115
-define('PR_ORIGINAL_SENDER_SEARCH_KEY'                ,mapi_prop_tag(PT_BINARY,      0x005C));
116
-define('PR_ORIGINAL_SENT_REPRESENTING_NAME'           ,mapi_prop_tag(PT_TSTRING,     0x005D));
117
-define('PR_ORIGINAL_SENT_REPRESENTING_ENTRYID'        ,mapi_prop_tag(PT_BINARY,      0x005E));
118
-define('PR_ORIGINAL_SENT_REPRESENTING_SEARCH_KEY'     ,mapi_prop_tag(PT_BINARY,      0x005F));
119
-
120
-define('PR_START_DATE'                                ,mapi_prop_tag(PT_SYSTIME,     0x0060));
121
-define('PR_END_DATE'                                  ,mapi_prop_tag(PT_SYSTIME,     0x0061));
122
-define('PR_OWNER_APPT_ID'                             ,mapi_prop_tag(PT_LONG,        0x0062));
123
-define('PR_RESPONSE_REQUESTED'                        ,mapi_prop_tag(PT_BOOLEAN,     0x0063));
124
-
125
-define('PR_SENT_REPRESENTING_ADDRTYPE'                ,mapi_prop_tag(PT_TSTRING,     0x0064));
126
-define('PR_SENT_REPRESENTING_EMAIL_ADDRESS'           ,mapi_prop_tag(PT_TSTRING,     0x0065));
127
-
128
-define('PR_ORIGINAL_SENDER_ADDRTYPE'                  ,mapi_prop_tag(PT_TSTRING,     0x0066));
129
-define('PR_ORIGINAL_SENDER_EMAIL_ADDRESS'             ,mapi_prop_tag(PT_TSTRING,     0x0067));
130
-
131
-define('PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE'       ,mapi_prop_tag(PT_TSTRING,     0x0068));
132
-define('PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS'  ,mapi_prop_tag(PT_TSTRING,     0x0069));
133
-
134
-define('PR_CONVERSATION_TOPIC'                        ,mapi_prop_tag(PT_TSTRING,     0x0070));
135
-define('PR_CONVERSATION_INDEX'                        ,mapi_prop_tag(PT_BINARY,      0x0071));
136
-
137
-define('PR_ORIGINAL_DISPLAY_BCC'                      ,mapi_prop_tag(PT_TSTRING,     0x0072));
138
-define('PR_ORIGINAL_DISPLAY_CC'                       ,mapi_prop_tag(PT_TSTRING,     0x0073));
139
-define('PR_ORIGINAL_DISPLAY_TO'                       ,mapi_prop_tag(PT_TSTRING,     0x0074));
140
-
141
-define('PR_RECEIVED_BY_ADDRTYPE'                      ,mapi_prop_tag(PT_TSTRING,     0x0075));
142
-define('PR_RECEIVED_BY_EMAIL_ADDRESS'                 ,mapi_prop_tag(PT_TSTRING,     0x0076));
143
-
144
-define('PR_RCVD_REPRESENTING_ADDRTYPE'                ,mapi_prop_tag(PT_TSTRING,     0x0077));
145
-define('PR_RCVD_REPRESENTING_EMAIL_ADDRESS'           ,mapi_prop_tag(PT_TSTRING,     0x0078));
146
-
147
-define('PR_ORIGINAL_AUTHOR_ADDRTYPE'                  ,mapi_prop_tag(PT_TSTRING,     0x0079));
148
-define('PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS'             ,mapi_prop_tag(PT_TSTRING,     0x007A));
149
-
150
-define('PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE'        ,mapi_prop_tag(PT_TSTRING,     0x007B));
151
-define('PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS'   ,mapi_prop_tag(PT_TSTRING,     0x007C));
152
-
153
-define('PR_TRANSPORT_MESSAGE_HEADERS'                 ,mapi_prop_tag(PT_TSTRING,     0x007D));
154
-
155
-define('PR_DELEGATION'                                ,mapi_prop_tag(PT_BINARY,      0x007E));
156
-
157
-define('PR_TNEF_CORRELATION_KEY'                      ,mapi_prop_tag(PT_BINARY,      0x007F));
158
-
159
-define('PR_MDN_DISPOSITION_TYPE'                      ,mapi_prop_tag(PT_STRING8,     0x0080));
160
-define('PR_MDN_DISPOSITION_SENDINGMODE'               ,mapi_prop_tag(PT_STRING8,     0x0081));
161
-
162
-define('PR_USER_ENTRYID'                              ,mapi_prop_tag(PT_BINARY,      0x6619));
163
-define('PR_USER_NAME'                                 ,mapi_prop_tag(PT_STRING8,     0x661A));
164
-define('PR_MAILBOX_OWNER_ENTRYID'                     ,mapi_prop_tag(PT_BINARY,      0x661B));
165
-define('PR_MAILBOX_OWNER_NAME'                        ,mapi_prop_tag(PT_STRING8,     0x661C));
166
-
167
-define('PR_HIERARCHY_SYNCHRONIZER'                    ,mapi_prop_tag(PT_OBJECT,      0x662C));
168
-define('PR_CONTENTS_SYNCHRONIZER'                     ,mapi_prop_tag(PT_OBJECT,      0x662D));
169
-define('PR_COLLECTOR'                                 ,mapi_prop_tag(PT_OBJECT,      0x662E));
170
-
171
-define('PR_SMTP_ADDRESS'                              ,mapi_prop_tag(PT_TSTRING,     0x39FE));
11
+define('PR_ACKNOWLEDGEMENT_MODE', mapi_prop_tag(PT_LONG, 0x0001));
12
+define('PR_ALTERNATE_RECIPIENT_ALLOWED', mapi_prop_tag(PT_BOOLEAN, 0x0002));
13
+define('PR_AUTHORIZING_USERS', mapi_prop_tag(PT_BINARY, 0x0003));
14
+define('PR_AUTO_FORWARD_COMMENT', mapi_prop_tag(PT_TSTRING, 0x0004));
15
+define('PR_AUTO_FORWARDED', mapi_prop_tag(PT_BOOLEAN, 0x0005));
16
+define('PR_CONTENT_CONFIDENTIALITY_ALGORITHM_ID', mapi_prop_tag(PT_BINARY, 0x0006));
17
+define('PR_CONTENT_CORRELATOR', mapi_prop_tag(PT_BINARY, 0x0007));
18
+define('PR_CONTENT_IDENTIFIER', mapi_prop_tag(PT_TSTRING, 0x0008));
19
+define('PR_CONTENT_LENGTH', mapi_prop_tag(PT_LONG, 0x0009));
20
+define('PR_CONTENT_RETURN_REQUESTED', mapi_prop_tag(PT_BOOLEAN, 0x000A));
21
+
22
+
23
+
24
+define('PR_CONVERSATION_KEY', mapi_prop_tag(PT_BINARY, 0x000B));
25
+
26
+define('PR_CONVERSION_EITS', mapi_prop_tag(PT_BINARY, 0x000C));
27
+define('PR_CONVERSION_WITH_LOSS_PROHIBITED', mapi_prop_tag(PT_BOOLEAN, 0x000D));
28
+define('PR_CONVERTED_EITS', mapi_prop_tag(PT_BINARY, 0x000E));
29
+define('PR_DEFERRED_DELIVERY_TIME', mapi_prop_tag(PT_SYSTIME, 0x000F));
30
+define('PR_DEFERRED_SEND_TIME', mapi_prop_tag(PT_SYSTIME, 0x3FEF));
31
+define('PR_DELIVER_TIME', mapi_prop_tag(PT_SYSTIME, 0x0010));
32
+define('PR_DISCARD_REASON', mapi_prop_tag(PT_LONG, 0x0011));
33
+define('PR_DISCLOSURE_OF_RECIPIENTS', mapi_prop_tag(PT_BOOLEAN, 0x0012));
34
+define('PR_DL_EXPANSION_HISTORY', mapi_prop_tag(PT_BINARY, 0x0013));
35
+define('PR_DL_EXPANSION_PROHIBITED', mapi_prop_tag(PT_BOOLEAN, 0x0014));
36
+define('PR_EXPIRY_TIME', mapi_prop_tag(PT_SYSTIME, 0x0015));
37
+define('PR_IMPLICIT_CONVERSION_PROHIBITED', mapi_prop_tag(PT_BOOLEAN, 0x0016));
38
+define('PR_IMPORTANCE', mapi_prop_tag(PT_LONG, 0x0017));
39
+define('PR_IPM_ID', mapi_prop_tag(PT_BINARY, 0x0018));
40
+define('PR_LATEST_DELIVERY_TIME', mapi_prop_tag(PT_SYSTIME, 0x0019));
41
+define('PR_MESSAGE_CLASS', mapi_prop_tag(PT_TSTRING, 0x001A));
42
+define('PR_MESSAGE_DELIVERY_ID', mapi_prop_tag(PT_BINARY, 0x001B));
43
+
44
+
45
+
46
+
47
+
48
+define('PR_MESSAGE_SECURITY_LABEL', mapi_prop_tag(PT_BINARY, 0x001E));
49
+define('PR_OBSOLETED_IPMS', mapi_prop_tag(PT_BINARY, 0x001F));
50
+define('PR_ORIGINALLY_INTENDED_RECIPIENT_NAME', mapi_prop_tag(PT_BINARY, 0x0020));
51
+define('PR_ORIGINAL_EITS', mapi_prop_tag(PT_BINARY, 0x0021));
52
+define('PR_ORIGINATOR_CERTIFICATE', mapi_prop_tag(PT_BINARY, 0x0022));
53
+define('PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED', mapi_prop_tag(PT_BOOLEAN, 0x0023));
54
+define('PR_ORIGINATOR_RETURN_ADDRESS', mapi_prop_tag(PT_BINARY, 0x0024));
55
+
56
+define('PR_PARENT_KEY', mapi_prop_tag(PT_BINARY, 0x0025));
57
+define('PR_PRIORITY', mapi_prop_tag(PT_LONG, 0x0026));
58
+
59
+define('PR_ORIGIN_CHECK', mapi_prop_tag(PT_BINARY, 0x0027));
60
+define('PR_PROOF_OF_SUBMISSION_REQUESTED', mapi_prop_tag(PT_BOOLEAN, 0x0028));
61
+define('PR_READ_RECEIPT_REQUESTED', mapi_prop_tag(PT_BOOLEAN, 0x0029));
62
+define('PR_RECEIPT_TIME', mapi_prop_tag(PT_SYSTIME, 0x002A));
63
+define('PR_RECIPIENT_REASSIGNMENT_PROHIBITED', mapi_prop_tag(PT_BOOLEAN, 0x002B));
64
+define('PR_REDIRECTION_HISTORY', mapi_prop_tag(PT_BINARY, 0x002C));
65
+define('PR_RELATED_IPMS', mapi_prop_tag(PT_BINARY, 0x002D));
66
+define('PR_ORIGINAL_SENSITIVITY', mapi_prop_tag(PT_LONG, 0x002E));
67
+define('PR_LANGUAGES', mapi_prop_tag(PT_TSTRING, 0x002F));
68
+define('PR_REPLY_TIME', mapi_prop_tag(PT_SYSTIME, 0x0030));
69
+define('PR_REPORT_TAG', mapi_prop_tag(PT_BINARY, 0x0031));
70
+define('PR_REPORT_TIME', mapi_prop_tag(PT_SYSTIME, 0x0032));
71
+define('PR_RETURNED_IPM', mapi_prop_tag(PT_BOOLEAN, 0x0033));
72
+define('PR_SECURITY', mapi_prop_tag(PT_LONG, 0x0034));
73
+define('PR_INCOMPLETE_COPY', mapi_prop_tag(PT_BOOLEAN, 0x0035));
74
+define('PR_SENSITIVITY', mapi_prop_tag(PT_LONG, 0x0036));
75
+define('PR_SUBJECT', mapi_prop_tag(PT_TSTRING, 0x0037));
76
+define('PR_SUBJECT_IPM', mapi_prop_tag(PT_BINARY, 0x0038));
77
+define('PR_CLIENT_SUBMIT_TIME', mapi_prop_tag(PT_SYSTIME, 0x0039));
78
+define('PR_REPORT_NAME', mapi_prop_tag(PT_TSTRING, 0x003A));
79
+define('PR_SENT_REPRESENTING_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x003B));
80
+define('PR_X400_CONTENT_TYPE', mapi_prop_tag(PT_BINARY, 0x003C));
81
+define('PR_SUBJECT_PREFIX', mapi_prop_tag(PT_TSTRING, 0x003D));
82
+define('PR_NON_RECEIPT_REASON', mapi_prop_tag(PT_LONG, 0x003E));
83
+define('PR_RECEIVED_BY_ENTRYID', mapi_prop_tag(PT_BINARY, 0x003F));
84
+define('PR_RECEIVED_BY_NAME', mapi_prop_tag(PT_TSTRING, 0x0040));
85
+define('PR_SENT_REPRESENTING_ENTRYID', mapi_prop_tag(PT_BINARY, 0x0041));
86
+define('PR_SENT_REPRESENTING_NAME', mapi_prop_tag(PT_TSTRING, 0x0042));
87
+define('PR_RCVD_REPRESENTING_ENTRYID', mapi_prop_tag(PT_BINARY, 0x0043));
88
+define('PR_RCVD_REPRESENTING_NAME', mapi_prop_tag(PT_TSTRING, 0x0044));
89
+define('PR_REPORT_ENTRYID', mapi_prop_tag(PT_BINARY, 0x0045));
90
+define('PR_READ_RECEIPT_ENTRYID', mapi_prop_tag(PT_BINARY, 0x0046));
91
+define('PR_MESSAGE_SUBMISSION_ID', mapi_prop_tag(PT_BINARY, 0x0047));
92
+define('PR_PROVIDER_SUBMIT_TIME', mapi_prop_tag(PT_SYSTIME, 0x0048));
93
+define('PR_ORIGINAL_SUBJECT', mapi_prop_tag(PT_TSTRING, 0x0049));
94
+define('PR_DISC_VAL', mapi_prop_tag(PT_BOOLEAN, 0x004A));
95
+define('PR_ORIG_MESSAGE_CLASS', mapi_prop_tag(PT_TSTRING, 0x004B));
96
+define('PR_ORIGINAL_AUTHOR_ENTRYID', mapi_prop_tag(PT_BINARY, 0x004C));
97
+define('PR_ORIGINAL_AUTHOR_NAME', mapi_prop_tag(PT_TSTRING, 0x004D));
98
+define('PR_ORIGINAL_SUBMIT_TIME', mapi_prop_tag(PT_SYSTIME, 0x004E));
99
+define('PR_REPLY_RECIPIENT_ENTRIES', mapi_prop_tag(PT_BINARY, 0x004F));
100
+define('PR_REPLY_RECIPIENT_NAMES', mapi_prop_tag(PT_TSTRING, 0x0050));
101
+
102
+define('PR_RECEIVED_BY_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x0051));
103
+define('PR_RCVD_REPRESENTING_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x0052));
104
+define('PR_READ_RECEIPT_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x0053));
105
+define('PR_REPORT_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x0054));
106
+define('PR_ORIGINAL_DELIVERY_TIME', mapi_prop_tag(PT_SYSTIME, 0x0055));
107
+define('PR_ORIGINAL_AUTHOR_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x0056));
108
+
109
+define('PR_MESSAGE_TO_ME', mapi_prop_tag(PT_BOOLEAN, 0x0057));
110
+define('PR_MESSAGE_CC_ME', mapi_prop_tag(PT_BOOLEAN, 0x0058));
111
+define('PR_MESSAGE_RECIP_ME', mapi_prop_tag(PT_BOOLEAN, 0x0059));
112
+
113
+define('PR_ORIGINAL_SENDER_NAME', mapi_prop_tag(PT_TSTRING, 0x005A));
114
+define('PR_ORIGINAL_SENDER_ENTRYID', mapi_prop_tag(PT_BINARY, 0x005B));
115
+define('PR_ORIGINAL_SENDER_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x005C));
116
+define('PR_ORIGINAL_SENT_REPRESENTING_NAME', mapi_prop_tag(PT_TSTRING, 0x005D));
117
+define('PR_ORIGINAL_SENT_REPRESENTING_ENTRYID', mapi_prop_tag(PT_BINARY, 0x005E));
118
+define('PR_ORIGINAL_SENT_REPRESENTING_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x005F));
119
+
120
+define('PR_START_DATE', mapi_prop_tag(PT_SYSTIME, 0x0060));
121
+define('PR_END_DATE', mapi_prop_tag(PT_SYSTIME, 0x0061));
122
+define('PR_OWNER_APPT_ID', mapi_prop_tag(PT_LONG, 0x0062));
123
+define('PR_RESPONSE_REQUESTED', mapi_prop_tag(PT_BOOLEAN, 0x0063));
124
+
125
+define('PR_SENT_REPRESENTING_ADDRTYPE', mapi_prop_tag(PT_TSTRING, 0x0064));
126
+define('PR_SENT_REPRESENTING_EMAIL_ADDRESS', mapi_prop_tag(PT_TSTRING, 0x0065));
127
+
128
+define('PR_ORIGINAL_SENDER_ADDRTYPE', mapi_prop_tag(PT_TSTRING, 0x0066));
129
+define('PR_ORIGINAL_SENDER_EMAIL_ADDRESS', mapi_prop_tag(PT_TSTRING, 0x0067));
130
+
131
+define('PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE', mapi_prop_tag(PT_TSTRING, 0x0068));
132
+define('PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS', mapi_prop_tag(PT_TSTRING, 0x0069));
133
+
134
+define('PR_CONVERSATION_TOPIC', mapi_prop_tag(PT_TSTRING, 0x0070));
135
+define('PR_CONVERSATION_INDEX', mapi_prop_tag(PT_BINARY, 0x0071));
136
+
137
+define('PR_ORIGINAL_DISPLAY_BCC', mapi_prop_tag(PT_TSTRING, 0x0072));
138
+define('PR_ORIGINAL_DISPLAY_CC', mapi_prop_tag(PT_TSTRING, 0x0073));
139
+define('PR_ORIGINAL_DISPLAY_TO', mapi_prop_tag(PT_TSTRING, 0x0074));
140
+
141
+define('PR_RECEIVED_BY_ADDRTYPE', mapi_prop_tag(PT_TSTRING, 0x0075));
142
+define('PR_RECEIVED_BY_EMAIL_ADDRESS', mapi_prop_tag(PT_TSTRING, 0x0076));
143
+
144
+define('PR_RCVD_REPRESENTING_ADDRTYPE', mapi_prop_tag(PT_TSTRING, 0x0077));
145
+define('PR_RCVD_REPRESENTING_EMAIL_ADDRESS', mapi_prop_tag(PT_TSTRING, 0x0078));
146
+
147
+define('PR_ORIGINAL_AUTHOR_ADDRTYPE', mapi_prop_tag(PT_TSTRING, 0x0079));
148
+define('PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS', mapi_prop_tag(PT_TSTRING, 0x007A));
149
+
150
+define('PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE', mapi_prop_tag(PT_TSTRING, 0x007B));
151
+define('PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS', mapi_prop_tag(PT_TSTRING, 0x007C));
152
+
153
+define('PR_TRANSPORT_MESSAGE_HEADERS', mapi_prop_tag(PT_TSTRING, 0x007D));
154
+
155
+define('PR_DELEGATION', mapi_prop_tag(PT_BINARY, 0x007E));
156
+
157
+define('PR_TNEF_CORRELATION_KEY', mapi_prop_tag(PT_BINARY, 0x007F));
158
+
159
+define('PR_MDN_DISPOSITION_TYPE', mapi_prop_tag(PT_STRING8, 0x0080));
160
+define('PR_MDN_DISPOSITION_SENDINGMODE', mapi_prop_tag(PT_STRING8, 0x0081));
161
+
162
+define('PR_USER_ENTRYID', mapi_prop_tag(PT_BINARY, 0x6619));
163
+define('PR_USER_NAME', mapi_prop_tag(PT_STRING8, 0x661A));
164
+define('PR_MAILBOX_OWNER_ENTRYID', mapi_prop_tag(PT_BINARY, 0x661B));
165
+define('PR_MAILBOX_OWNER_NAME', mapi_prop_tag(PT_STRING8, 0x661C));
166
+
167
+define('PR_HIERARCHY_SYNCHRONIZER', mapi_prop_tag(PT_OBJECT, 0x662C));
168
+define('PR_CONTENTS_SYNCHRONIZER', mapi_prop_tag(PT_OBJECT, 0x662D));
169
+define('PR_COLLECTOR', mapi_prop_tag(PT_OBJECT, 0x662E));
170
+
171
+define('PR_SMTP_ADDRESS', mapi_prop_tag(PT_TSTRING, 0x39FE));
172 172
 
173 173
 /*
174 174
  *  Message content properties
175 175
  */
176 176
 
177
-define('PR_BODY'                                      ,mapi_prop_tag(PT_TSTRING,     0x1000));
178
-define('PR_HTML'                                      ,mapi_prop_tag(PT_BINARY,      0x1013));
179
-define('PR_REPORT_TEXT'                               ,mapi_prop_tag(PT_TSTRING,     0x1001));
180
-define('PR_ORIGINATOR_AND_DL_EXPANSION_HISTORY'       ,mapi_prop_tag(PT_BINARY,      0x1002));
181
-define('PR_REPORTING_DL_NAME'                         ,mapi_prop_tag(PT_BINARY,      0x1003));
182
-define('PR_REPORTING_MTA_CERTIFICATE'                 ,mapi_prop_tag(PT_BINARY,      0x1004));
177
+define('PR_BODY', mapi_prop_tag(PT_TSTRING, 0x1000));
178
+define('PR_HTML', mapi_prop_tag(PT_BINARY, 0x1013));
179
+define('PR_REPORT_TEXT', mapi_prop_tag(PT_TSTRING, 0x1001));
180
+define('PR_ORIGINATOR_AND_DL_EXPANSION_HISTORY', mapi_prop_tag(PT_BINARY, 0x1002));
181
+define('PR_REPORTING_DL_NAME', mapi_prop_tag(PT_BINARY, 0x1003));
182
+define('PR_REPORTING_MTA_CERTIFICATE', mapi_prop_tag(PT_BINARY, 0x1004));
183 183
 
184 184
 /*  Removed 'PR_REPORT_ORIGIN_AUTHENTICATION_CHECK with DCR 3865, use 'PR_ORIGIN_CHECK */
185 185
 
186
-define('PR_RTF_SYNC_BODY_CRC'                         ,mapi_prop_tag(PT_LONG,        0x1006));
187
-define('PR_RTF_SYNC_BODY_COUNT'                       ,mapi_prop_tag(PT_LONG,        0x1007));
188
-define('PR_RTF_SYNC_BODY_TAG'                         ,mapi_prop_tag(PT_TSTRING,     0x1008));
189
-define('PR_RTF_COMPRESSED'                            ,mapi_prop_tag(PT_BINARY,      0x1009));
190
-define('PR_RTF_SYNC_PREFIX_COUNT'                     ,mapi_prop_tag(PT_LONG,        0x1010));
191
-define('PR_RTF_SYNC_TRAILING_COUNT'                   ,mapi_prop_tag(PT_LONG,        0x1011));
192
-define('PR_ORIGINALLY_INTENDED_RECIP_ENTRYID'         ,mapi_prop_tag(PT_BINARY,      0x1012));
193
-define('PR_NATIVE_BODY_INFO'                          ,mapi_prop_tag(PT_LONG,        0x1016));
186
+define('PR_RTF_SYNC_BODY_CRC', mapi_prop_tag(PT_LONG, 0x1006));
187
+define('PR_RTF_SYNC_BODY_COUNT', mapi_prop_tag(PT_LONG, 0x1007));
188
+define('PR_RTF_SYNC_BODY_TAG', mapi_prop_tag(PT_TSTRING, 0x1008));
189
+define('PR_RTF_COMPRESSED', mapi_prop_tag(PT_BINARY, 0x1009));
190
+define('PR_RTF_SYNC_PREFIX_COUNT', mapi_prop_tag(PT_LONG, 0x1010));
191
+define('PR_RTF_SYNC_TRAILING_COUNT', mapi_prop_tag(PT_LONG, 0x1011));
192
+define('PR_ORIGINALLY_INTENDED_RECIP_ENTRYID', mapi_prop_tag(PT_BINARY, 0x1012));
193
+define('PR_NATIVE_BODY_INFO', mapi_prop_tag(PT_LONG, 0x1016));
194 194
 
195
-define('PR_CONFLICT_ITEMS'                            ,mapi_prop_tag(PT_MV_BINARY,   0x1098));
195
+define('PR_CONFLICT_ITEMS', mapi_prop_tag(PT_MV_BINARY, 0x1098));
196 196
 
197 197
 /*
198 198
  *  Reserved 0x1100-0x1200
@@ -203,39 +203,39 @@  discard block
 block discarded – undo
203 203
  *  Message recipient properties
204 204
  */
205 205
 
206
-define('PR_CONTENT_INTEGRITY_CHECK'                   ,mapi_prop_tag(PT_BINARY,      0x0C00));
207
-define('PR_EXPLICIT_CONVERSION'                       ,mapi_prop_tag(PT_LONG,        0x0C01));
208
-define('PR_IPM_RETURN_REQUESTED'                      ,mapi_prop_tag(PT_BOOLEAN,     0x0C02));
209
-define('PR_MESSAGE_TOKEN'                             ,mapi_prop_tag(PT_BINARY,      0x0C03));
210
-define('PR_NDR_REASON_CODE'                           ,mapi_prop_tag(PT_LONG,        0x0C04));
211
-define('PR_NDR_DIAG_CODE'                             ,mapi_prop_tag(PT_LONG,        0x0C05));
212
-define('PR_NON_RECEIPT_NOTIFICATION_REQUESTED'        ,mapi_prop_tag(PT_BOOLEAN,     0x0C06));
213
-define('PR_DELIVERY_POINT'                            ,mapi_prop_tag(PT_LONG,        0x0C07));
214
-
215
-define('PR_ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED'  ,mapi_prop_tag(PT_BOOLEAN,     0x0C08));
216
-define('PR_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT'  ,mapi_prop_tag(PT_BINARY,      0x0C09));
217
-define('PR_PHYSICAL_DELIVERY_BUREAU_FAX_DELIVERY'     ,mapi_prop_tag(PT_BOOLEAN,     0x0C0A));
218
-define('PR_PHYSICAL_DELIVERY_MODE'                    ,mapi_prop_tag(PT_LONG,        0x0C0B));
219
-define('PR_PHYSICAL_DELIVERY_REPORT_REQUEST'          ,mapi_prop_tag(PT_LONG,        0x0C0C));
220
-define('PR_PHYSICAL_FORWARDING_ADDRESS'               ,mapi_prop_tag(PT_BINARY,      0x0C0D));
221
-define('PR_PHYSICAL_FORWARDING_ADDRESS_REQUESTED'     ,mapi_prop_tag(PT_BOOLEAN,     0x0C0E));
222
-define('PR_PHYSICAL_FORWARDING_PROHIBITED'            ,mapi_prop_tag(PT_BOOLEAN,     0x0C0F));
223
-define('PR_PHYSICAL_RENDITION_ATTRIBUTES'             ,mapi_prop_tag(PT_BINARY,      0x0C10));
224
-define('PR_PROOF_OF_DELIVERY'                         ,mapi_prop_tag(PT_BINARY,      0x0C11));
225
-define('PR_PROOF_OF_DELIVERY_REQUESTED'               ,mapi_prop_tag(PT_BOOLEAN,     0x0C12));
226
-define('PR_RECIPIENT_CERTIFICATE'                     ,mapi_prop_tag(PT_BINARY,      0x0C13));
227
-define('PR_RECIPIENT_NUMBER_FOR_ADVICE'               ,mapi_prop_tag(PT_TSTRING,     0x0C14));
228
-define('PR_RECIPIENT_TYPE'                            ,mapi_prop_tag(PT_LONG,        0x0C15));
229
-define('PR_REGISTERED_MAIL_TYPE'                      ,mapi_prop_tag(PT_LONG,        0x0C16));
230
-define('PR_REPLY_REQUESTED'                           ,mapi_prop_tag(PT_BOOLEAN,     0x0C17));
231
-define('PR_REQUESTED_DELIVERY_METHOD'                 ,mapi_prop_tag(PT_LONG,        0x0C18));
232
-define('PR_SENDER_ENTRYID'                            ,mapi_prop_tag(PT_BINARY,      0x0C19));
233
-define('PR_SENDER_NAME'                               ,mapi_prop_tag(PT_TSTRING,     0x0C1A));
234
-define('PR_SUPPLEMENTARY_INFO'                        ,mapi_prop_tag(PT_TSTRING,     0x0C1B));
235
-define('PR_TYPE_OF_MTS_USER'                          ,mapi_prop_tag(PT_LONG,        0x0C1C));
236
-define('PR_SENDER_SEARCH_KEY'                         ,mapi_prop_tag(PT_BINARY,      0x0C1D));
237
-define('PR_SENDER_ADDRTYPE'                           ,mapi_prop_tag(PT_TSTRING,     0x0C1E));
238
-define('PR_SENDER_EMAIL_ADDRESS'                      ,mapi_prop_tag(PT_TSTRING,     0x0C1F));
206
+define('PR_CONTENT_INTEGRITY_CHECK', mapi_prop_tag(PT_BINARY, 0x0C00));
207
+define('PR_EXPLICIT_CONVERSION', mapi_prop_tag(PT_LONG, 0x0C01));
208
+define('PR_IPM_RETURN_REQUESTED', mapi_prop_tag(PT_BOOLEAN, 0x0C02));
209
+define('PR_MESSAGE_TOKEN', mapi_prop_tag(PT_BINARY, 0x0C03));
210
+define('PR_NDR_REASON_CODE', mapi_prop_tag(PT_LONG, 0x0C04));
211
+define('PR_NDR_DIAG_CODE', mapi_prop_tag(PT_LONG, 0x0C05));
212
+define('PR_NON_RECEIPT_NOTIFICATION_REQUESTED', mapi_prop_tag(PT_BOOLEAN, 0x0C06));
213
+define('PR_DELIVERY_POINT', mapi_prop_tag(PT_LONG, 0x0C07));
214
+
215
+define('PR_ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED', mapi_prop_tag(PT_BOOLEAN, 0x0C08));
216
+define('PR_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT', mapi_prop_tag(PT_BINARY, 0x0C09));
217
+define('PR_PHYSICAL_DELIVERY_BUREAU_FAX_DELIVERY', mapi_prop_tag(PT_BOOLEAN, 0x0C0A));
218
+define('PR_PHYSICAL_DELIVERY_MODE', mapi_prop_tag(PT_LONG, 0x0C0B));
219
+define('PR_PHYSICAL_DELIVERY_REPORT_REQUEST', mapi_prop_tag(PT_LONG, 0x0C0C));
220
+define('PR_PHYSICAL_FORWARDING_ADDRESS', mapi_prop_tag(PT_BINARY, 0x0C0D));
221
+define('PR_PHYSICAL_FORWARDING_ADDRESS_REQUESTED', mapi_prop_tag(PT_BOOLEAN, 0x0C0E));
222
+define('PR_PHYSICAL_FORWARDING_PROHIBITED', mapi_prop_tag(PT_BOOLEAN, 0x0C0F));
223
+define('PR_PHYSICAL_RENDITION_ATTRIBUTES', mapi_prop_tag(PT_BINARY, 0x0C10));
224
+define('PR_PROOF_OF_DELIVERY', mapi_prop_tag(PT_BINARY, 0x0C11));
225
+define('PR_PROOF_OF_DELIVERY_REQUESTED', mapi_prop_tag(PT_BOOLEAN, 0x0C12));
226
+define('PR_RECIPIENT_CERTIFICATE', mapi_prop_tag(PT_BINARY, 0x0C13));
227
+define('PR_RECIPIENT_NUMBER_FOR_ADVICE', mapi_prop_tag(PT_TSTRING, 0x0C14));
228
+define('PR_RECIPIENT_TYPE', mapi_prop_tag(PT_LONG, 0x0C15));
229
+define('PR_REGISTERED_MAIL_TYPE', mapi_prop_tag(PT_LONG, 0x0C16));
230
+define('PR_REPLY_REQUESTED', mapi_prop_tag(PT_BOOLEAN, 0x0C17));
231
+define('PR_REQUESTED_DELIVERY_METHOD', mapi_prop_tag(PT_LONG, 0x0C18));
232
+define('PR_SENDER_ENTRYID', mapi_prop_tag(PT_BINARY, 0x0C19));
233
+define('PR_SENDER_NAME', mapi_prop_tag(PT_TSTRING, 0x0C1A));
234
+define('PR_SUPPLEMENTARY_INFO', mapi_prop_tag(PT_TSTRING, 0x0C1B));
235
+define('PR_TYPE_OF_MTS_USER', mapi_prop_tag(PT_LONG, 0x0C1C));
236
+define('PR_SENDER_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x0C1D));
237
+define('PR_SENDER_ADDRTYPE', mapi_prop_tag(PT_TSTRING, 0x0C1E));
238
+define('PR_SENDER_EMAIL_ADDRESS', mapi_prop_tag(PT_TSTRING, 0x0C1F));
239 239
 
240 240
 /*
241 241
  *  Message non-transmittable properties
@@ -249,47 +249,47 @@  discard block
 block discarded – undo
249 249
  * return from IMessage::CopyTo when an error is encountered copying them
250 250
  */
251 251
 
252
-define('PR_CURRENT_VERSION'                           ,mapi_prop_tag(PT_I8,          0x0E00));
253
-define('PR_DELETE_AFTER_SUBMIT'                       ,mapi_prop_tag(PT_BOOLEAN,     0x0E01));
254
-define('PR_DISPLAY_BCC'                               ,mapi_prop_tag(PT_TSTRING,     0x0E02));
255
-define('PR_DISPLAY_CC'                                ,mapi_prop_tag(PT_TSTRING,     0x0E03));
256
-define('PR_DISPLAY_TO'                                ,mapi_prop_tag(PT_TSTRING,     0x0E04));
257
-define('PR_PARENT_DISPLAY'                            ,mapi_prop_tag(PT_TSTRING,     0x0E05));
258
-define('PR_MESSAGE_DELIVERY_TIME'                     ,mapi_prop_tag(PT_SYSTIME,     0x0E06));
259
-define('PR_MESSAGE_FLAGS'                             ,mapi_prop_tag(PT_LONG,        0x0E07));
260
-define('PR_MESSAGE_SIZE'                              ,mapi_prop_tag(PT_LONG,        0x0E08));
261
-define('PR_MESSAGE_SIZE_EXTENDED'                     ,mapi_prop_tag(PT_LONGLONG,    0x0E08));
262
-define('PR_PARENT_ENTRYID'                            ,mapi_prop_tag(PT_BINARY,      0x0E09));
263
-define('PR_SENTMAIL_ENTRYID'                          ,mapi_prop_tag(PT_BINARY,      0x0E0A));
264
-define('PR_CORRELATE'                                 ,mapi_prop_tag(PT_BOOLEAN,     0x0E0C));
265
-define('PR_CORRELATE_MTSID'                           ,mapi_prop_tag(PT_BINARY,      0x0E0D));
266
-define('PR_DISCRETE_VALUES'                           ,mapi_prop_tag(PT_BOOLEAN,     0x0E0E));
267
-define('PR_RESPONSIBILITY'                            ,mapi_prop_tag(PT_BOOLEAN,     0x0E0F));
268
-define('PR_SPOOLER_STATUS'                            ,mapi_prop_tag(PT_LONG,        0x0E10));
269
-define('PR_TRANSPORT_STATUS'                          ,mapi_prop_tag(PT_LONG,        0x0E11));
270
-define('PR_MESSAGE_RECIPIENTS'                        ,mapi_prop_tag(PT_OBJECT,      0x0E12));
271
-define('PR_MESSAGE_ATTACHMENTS'                       ,mapi_prop_tag(PT_OBJECT,      0x0E13));
272
-define('PR_SUBMIT_FLAGS'                              ,mapi_prop_tag(PT_LONG,        0x0E14));
273
-define('PR_RECIPIENT_STATUS'                          ,mapi_prop_tag(PT_LONG,        0x0E15));
274
-define('PR_TRANSPORT_KEY'                             ,mapi_prop_tag(PT_LONG,        0x0E16));
275
-define('PR_MSG_STATUS'                                ,mapi_prop_tag(PT_LONG,        0x0E17));
276
-define('PR_MESSAGE_DOWNLOAD_TIME'                     ,mapi_prop_tag(PT_LONG,        0x0E18));
277
-define('PR_CREATION_VERSION'                          ,mapi_prop_tag(PT_I8,          0x0E19));
278
-define('PR_MODIFY_VERSION'                            ,mapi_prop_tag(PT_I8,          0x0E1A));
279
-define('PR_HASATTACH'                                 ,mapi_prop_tag(PT_BOOLEAN,     0x0E1B));
280
-define('PR_BODY_CRC'                                  ,mapi_prop_tag(PT_LONG,        0x0E1C));
281
-define('PR_NORMALIZED_SUBJECT'                        ,mapi_prop_tag(PT_TSTRING,     0x0E1D));
282
-define('PR_RTF_IN_SYNC'                               ,mapi_prop_tag(PT_BOOLEAN,     0x0E1F));
283
-define('PR_ATTACH_SIZE'                               ,mapi_prop_tag(PT_LONG,        0x0E20));
284
-define('PR_ATTACH_NUM'                                ,mapi_prop_tag(PT_LONG,        0x0E21));
285
-define('PR_PREPROCESS'                                ,mapi_prop_tag(PT_BOOLEAN,     0x0E22));
252
+define('PR_CURRENT_VERSION', mapi_prop_tag(PT_I8, 0x0E00));
253
+define('PR_DELETE_AFTER_SUBMIT', mapi_prop_tag(PT_BOOLEAN, 0x0E01));
254
+define('PR_DISPLAY_BCC', mapi_prop_tag(PT_TSTRING, 0x0E02));
255
+define('PR_DISPLAY_CC', mapi_prop_tag(PT_TSTRING, 0x0E03));
256
+define('PR_DISPLAY_TO', mapi_prop_tag(PT_TSTRING, 0x0E04));
257
+define('PR_PARENT_DISPLAY', mapi_prop_tag(PT_TSTRING, 0x0E05));
258
+define('PR_MESSAGE_DELIVERY_TIME', mapi_prop_tag(PT_SYSTIME, 0x0E06));
259
+define('PR_MESSAGE_FLAGS', mapi_prop_tag(PT_LONG, 0x0E07));
260
+define('PR_MESSAGE_SIZE', mapi_prop_tag(PT_LONG, 0x0E08));
261
+define('PR_MESSAGE_SIZE_EXTENDED', mapi_prop_tag(PT_LONGLONG, 0x0E08));
262
+define('PR_PARENT_ENTRYID', mapi_prop_tag(PT_BINARY, 0x0E09));
263
+define('PR_SENTMAIL_ENTRYID', mapi_prop_tag(PT_BINARY, 0x0E0A));
264
+define('PR_CORRELATE', mapi_prop_tag(PT_BOOLEAN, 0x0E0C));
265
+define('PR_CORRELATE_MTSID', mapi_prop_tag(PT_BINARY, 0x0E0D));
266
+define('PR_DISCRETE_VALUES', mapi_prop_tag(PT_BOOLEAN, 0x0E0E));
267
+define('PR_RESPONSIBILITY', mapi_prop_tag(PT_BOOLEAN, 0x0E0F));
268
+define('PR_SPOOLER_STATUS', mapi_prop_tag(PT_LONG, 0x0E10));
269
+define('PR_TRANSPORT_STATUS', mapi_prop_tag(PT_LONG, 0x0E11));
270
+define('PR_MESSAGE_RECIPIENTS', mapi_prop_tag(PT_OBJECT, 0x0E12));
271
+define('PR_MESSAGE_ATTACHMENTS', mapi_prop_tag(PT_OBJECT, 0x0E13));
272
+define('PR_SUBMIT_FLAGS', mapi_prop_tag(PT_LONG, 0x0E14));
273
+define('PR_RECIPIENT_STATUS', mapi_prop_tag(PT_LONG, 0x0E15));
274
+define('PR_TRANSPORT_KEY', mapi_prop_tag(PT_LONG, 0x0E16));
275
+define('PR_MSG_STATUS', mapi_prop_tag(PT_LONG, 0x0E17));
276
+define('PR_MESSAGE_DOWNLOAD_TIME', mapi_prop_tag(PT_LONG, 0x0E18));
277
+define('PR_CREATION_VERSION', mapi_prop_tag(PT_I8, 0x0E19));
278
+define('PR_MODIFY_VERSION', mapi_prop_tag(PT_I8, 0x0E1A));
279
+define('PR_HASATTACH', mapi_prop_tag(PT_BOOLEAN, 0x0E1B));
280
+define('PR_BODY_CRC', mapi_prop_tag(PT_LONG, 0x0E1C));
281
+define('PR_NORMALIZED_SUBJECT', mapi_prop_tag(PT_TSTRING, 0x0E1D));
282
+define('PR_RTF_IN_SYNC', mapi_prop_tag(PT_BOOLEAN, 0x0E1F));
283
+define('PR_ATTACH_SIZE', mapi_prop_tag(PT_LONG, 0x0E20));
284
+define('PR_ATTACH_NUM', mapi_prop_tag(PT_LONG, 0x0E21));
285
+define('PR_PREPROCESS', mapi_prop_tag(PT_BOOLEAN, 0x0E22));
286 286
 
287 287
 /* 'PR_ORIGINAL_DISPLAY_TO, _CC, and _BCC moved to transmittible range 03/09/95 */
288 288
 
289
-define('PR_ORIGINATING_MTA_CERTIFICATE'               ,mapi_prop_tag(PT_BINARY,      0x0E25));
290
-define('PR_PROOF_OF_SUBMISSION'                       ,mapi_prop_tag(PT_BINARY,      0x0E26));
289
+define('PR_ORIGINATING_MTA_CERTIFICATE', mapi_prop_tag(PT_BINARY, 0x0E25));
290
+define('PR_PROOF_OF_SUBMISSION', mapi_prop_tag(PT_BINARY, 0x0E26));
291 291
 
292
-define('PR_TODO_ITEM_FLAGS'                           ,mapi_prop_tag(PT_LONG,        0x0E2B));
292
+define('PR_TODO_ITEM_FLAGS', mapi_prop_tag(PT_LONG, 0x0E2B));
293 293
 
294 294
 /*
295 295
  * The range of non-message and non-recipient property IDs (0x3000 - 0x3FFF)); is
@@ -326,80 +326,80 @@  discard block
 block discarded – undo
326 326
  * -- these ids are in the non-transmittable range
327 327
  */
328 328
 
329
-define('PR_ENTRYID'                                   ,mapi_prop_tag(PT_BINARY,      0x0FFF));
330
-define('PR_OBJECT_TYPE'                               ,mapi_prop_tag(PT_LONG,        0x0FFE));
331
-define('PR_ICON'                                      ,mapi_prop_tag(PT_BINARY,      0x0FFD));
332
-define('PR_MINI_ICON'                                 ,mapi_prop_tag(PT_BINARY,      0x0FFC));
333
-define('PR_STORE_ENTRYID'                             ,mapi_prop_tag(PT_BINARY,      0x0FFB));
334
-define('PR_STORE_RECORD_KEY'                          ,mapi_prop_tag(PT_BINARY,      0x0FFA));
335
-define('PR_RECORD_KEY'                                ,mapi_prop_tag(PT_BINARY,      0x0FF9));
336
-define('PR_MAPPING_SIGNATURE'                         ,mapi_prop_tag(PT_BINARY,      0x0FF8));
337
-define('PR_ACCESS_LEVEL'                              ,mapi_prop_tag(PT_LONG,        0x0FF7));
338
-define('PR_INSTANCE_KEY'                              ,mapi_prop_tag(PT_BINARY,      0x0FF6));
339
-define('PR_ROW_TYPE'                                  ,mapi_prop_tag(PT_LONG,        0x0FF5));
340
-define('PR_ACCESS'                                    ,mapi_prop_tag(PT_LONG,        0x0FF4));
329
+define('PR_ENTRYID', mapi_prop_tag(PT_BINARY, 0x0FFF));
330
+define('PR_OBJECT_TYPE', mapi_prop_tag(PT_LONG, 0x0FFE));
331
+define('PR_ICON', mapi_prop_tag(PT_BINARY, 0x0FFD));
332
+define('PR_MINI_ICON', mapi_prop_tag(PT_BINARY, 0x0FFC));
333
+define('PR_STORE_ENTRYID', mapi_prop_tag(PT_BINARY, 0x0FFB));
334
+define('PR_STORE_RECORD_KEY', mapi_prop_tag(PT_BINARY, 0x0FFA));
335
+define('PR_RECORD_KEY', mapi_prop_tag(PT_BINARY, 0x0FF9));
336
+define('PR_MAPPING_SIGNATURE', mapi_prop_tag(PT_BINARY, 0x0FF8));
337
+define('PR_ACCESS_LEVEL', mapi_prop_tag(PT_LONG, 0x0FF7));
338
+define('PR_INSTANCE_KEY', mapi_prop_tag(PT_BINARY, 0x0FF6));
339
+define('PR_ROW_TYPE', mapi_prop_tag(PT_LONG, 0x0FF5));
340
+define('PR_ACCESS', mapi_prop_tag(PT_LONG, 0x0FF4));
341 341
 
342 342
 /*
343 343
  * properties that are common to multiple objects (usually not including message objects));
344 344
  * -- these ids are in the transmittable range
345 345
  */
346 346
 
347
-define('PR_ROWID'                                     ,mapi_prop_tag(PT_LONG,        0x3000));
348
-define('PR_DISPLAY_NAME'                              ,mapi_prop_tag(PT_TSTRING,     0x3001));
349
-define('PR_DISPLAY_NAME_W'                            ,mapi_prop_tag(PT_UNICODE,     0x3001));
350
-define('PR_ADDRTYPE'                                  ,mapi_prop_tag(PT_TSTRING,     0x3002));
351
-define('PR_EMAIL_ADDRESS'                             ,mapi_prop_tag(PT_TSTRING,     0x3003));
352
-define('PR_COMMENT'                                   ,mapi_prop_tag(PT_TSTRING,     0x3004));
353
-define('PR_DEPTH'                                     ,mapi_prop_tag(PT_LONG,        0x3005));
354
-define('PR_PROVIDER_DISPLAY'                          ,mapi_prop_tag(PT_TSTRING,     0x3006));
355
-define('PR_CREATION_TIME'                             ,mapi_prop_tag(PT_SYSTIME,     0x3007));
356
-define('PR_LAST_MODIFICATION_TIME'                    ,mapi_prop_tag(PT_SYSTIME,     0x3008));
357
-define('PR_RESOURCE_FLAGS'                            ,mapi_prop_tag(PT_LONG,        0x3009));
358
-define('PR_PROVIDER_DLL_NAME'                         ,mapi_prop_tag(PT_TSTRING,     0x300A));
359
-define('PR_SEARCH_KEY'                                ,mapi_prop_tag(PT_BINARY,      0x300B));
360
-define('PR_PROVIDER_UID'                              ,mapi_prop_tag(PT_BINARY,      0x300C));
361
-define('PR_PROVIDER_ORDINAL'                          ,mapi_prop_tag(PT_LONG,        0x300D));
347
+define('PR_ROWID', mapi_prop_tag(PT_LONG, 0x3000));
348
+define('PR_DISPLAY_NAME', mapi_prop_tag(PT_TSTRING, 0x3001));
349
+define('PR_DISPLAY_NAME_W', mapi_prop_tag(PT_UNICODE, 0x3001));
350
+define('PR_ADDRTYPE', mapi_prop_tag(PT_TSTRING, 0x3002));
351
+define('PR_EMAIL_ADDRESS', mapi_prop_tag(PT_TSTRING, 0x3003));
352
+define('PR_COMMENT', mapi_prop_tag(PT_TSTRING, 0x3004));
353
+define('PR_DEPTH', mapi_prop_tag(PT_LONG, 0x3005));
354
+define('PR_PROVIDER_DISPLAY', mapi_prop_tag(PT_TSTRING, 0x3006));
355
+define('PR_CREATION_TIME', mapi_prop_tag(PT_SYSTIME, 0x3007));
356
+define('PR_LAST_MODIFICATION_TIME', mapi_prop_tag(PT_SYSTIME, 0x3008));
357
+define('PR_RESOURCE_FLAGS', mapi_prop_tag(PT_LONG, 0x3009));
358
+define('PR_PROVIDER_DLL_NAME', mapi_prop_tag(PT_TSTRING, 0x300A));
359
+define('PR_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x300B));
360
+define('PR_PROVIDER_UID', mapi_prop_tag(PT_BINARY, 0x300C));
361
+define('PR_PROVIDER_ORDINAL', mapi_prop_tag(PT_LONG, 0x300D));
362 362
 
363 363
 /*
364 364
  *  MAPI Form properties
365 365
  */
366
-define('PR_FORM_VERSION'                              ,mapi_prop_tag(PT_TSTRING,     0x3301));
367
-define('PR_FORM_CLSID'                                ,mapi_prop_tag(PT_CLSID,       0x3302));
368
-define('PR_FORM_CONTACT_NAME'                         ,mapi_prop_tag(PT_TSTRING,     0x3303));
369
-define('PR_FORM_CATEGORY'                             ,mapi_prop_tag(PT_TSTRING,     0x3304));
370
-define('PR_FORM_CATEGORY_SUB'                         ,mapi_prop_tag(PT_TSTRING,     0x3305));
371
-define('PR_FORM_HOST_MAP'                             ,mapi_prop_tag(PT_MV_LONG,     0x3306));
372
-define('PR_FORM_HIDDEN'                               ,mapi_prop_tag(PT_BOOLEAN,     0x3307));
373
-define('PR_FORM_DESIGNER_NAME'                        ,mapi_prop_tag(PT_TSTRING,     0x3308));
374
-define('PR_FORM_DESIGNER_GUID'                        ,mapi_prop_tag(PT_CLSID,       0x3309));
375
-define('PR_FORM_MESSAGE_BEHAVIOR'                     ,mapi_prop_tag(PT_LONG,        0x330A));
366
+define('PR_FORM_VERSION', mapi_prop_tag(PT_TSTRING, 0x3301));
367
+define('PR_FORM_CLSID', mapi_prop_tag(PT_CLSID, 0x3302));
368
+define('PR_FORM_CONTACT_NAME', mapi_prop_tag(PT_TSTRING, 0x3303));
369
+define('PR_FORM_CATEGORY', mapi_prop_tag(PT_TSTRING, 0x3304));
370
+define('PR_FORM_CATEGORY_SUB', mapi_prop_tag(PT_TSTRING, 0x3305));
371
+define('PR_FORM_HOST_MAP', mapi_prop_tag(PT_MV_LONG, 0x3306));
372
+define('PR_FORM_HIDDEN', mapi_prop_tag(PT_BOOLEAN, 0x3307));
373
+define('PR_FORM_DESIGNER_NAME', mapi_prop_tag(PT_TSTRING, 0x3308));
374
+define('PR_FORM_DESIGNER_GUID', mapi_prop_tag(PT_CLSID, 0x3309));
375
+define('PR_FORM_MESSAGE_BEHAVIOR', mapi_prop_tag(PT_LONG, 0x330A));
376 376
 
377 377
 /*
378 378
  *  Message store properties
379 379
  */
380 380
 
381
-define('PR_DEFAULT_STORE'                             ,mapi_prop_tag(PT_BOOLEAN,     0x3400));
382
-define('PR_STORE_SUPPORT_MASK'                        ,mapi_prop_tag(PT_LONG,        0x340D));
383
-define('PR_STORE_STATE'                               ,mapi_prop_tag(PT_LONG,        0x340E));
381
+define('PR_DEFAULT_STORE', mapi_prop_tag(PT_BOOLEAN, 0x3400));
382
+define('PR_STORE_SUPPORT_MASK', mapi_prop_tag(PT_LONG, 0x340D));
383
+define('PR_STORE_STATE', mapi_prop_tag(PT_LONG, 0x340E));
384 384
 
385
-define('PR_IPM_SUBTREE_SEARCH_KEY'                    ,mapi_prop_tag(PT_BINARY,      0x3410));
386
-define('PR_IPM_OUTBOX_SEARCH_KEY'                     ,mapi_prop_tag(PT_BINARY,      0x3411));
387
-define('PR_IPM_WASTEBASKET_SEARCH_KEY'                ,mapi_prop_tag(PT_BINARY,      0x3412));
388
-define('PR_IPM_SENTMAIL_SEARCH_KEY'                   ,mapi_prop_tag(PT_BINARY,      0x3413));
389
-define('PR_MDB_PROVIDER'                              ,mapi_prop_tag(PT_BINARY,      0x3414));
390
-define('PR_RECEIVE_FOLDER_SETTINGS'                   ,mapi_prop_tag(PT_OBJECT,      0x3415));
385
+define('PR_IPM_SUBTREE_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x3410));
386
+define('PR_IPM_OUTBOX_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x3411));
387
+define('PR_IPM_WASTEBASKET_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x3412));
388
+define('PR_IPM_SENTMAIL_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x3413));
389
+define('PR_MDB_PROVIDER', mapi_prop_tag(PT_BINARY, 0x3414));
390
+define('PR_RECEIVE_FOLDER_SETTINGS', mapi_prop_tag(PT_OBJECT, 0x3415));
391 391
 
392
-define('PR_VALID_FOLDER_MASK'                         ,mapi_prop_tag(PT_LONG,        0x35DF));
393
-define('PR_IPM_SUBTREE_ENTRYID'                       ,mapi_prop_tag(PT_BINARY,      0x35E0));
392
+define('PR_VALID_FOLDER_MASK', mapi_prop_tag(PT_LONG, 0x35DF));
393
+define('PR_IPM_SUBTREE_ENTRYID', mapi_prop_tag(PT_BINARY, 0x35E0));
394 394
 
395
-define('PR_IPM_OUTBOX_ENTRYID'                        ,mapi_prop_tag(PT_BINARY,      0x35E2));
396
-define('PR_IPM_WASTEBASKET_ENTRYID'                   ,mapi_prop_tag(PT_BINARY,      0x35E3));
397
-define('PR_IPM_SENTMAIL_ENTRYID'                      ,mapi_prop_tag(PT_BINARY,      0x35E4));
398
-define('PR_VIEWS_ENTRYID'                             ,mapi_prop_tag(PT_BINARY,      0x35E5));
399
-define('PR_COMMON_VIEWS_ENTRYID'                      ,mapi_prop_tag(PT_BINARY,      0x35E6));
400
-define('PR_FINDER_ENTRYID'                            ,mapi_prop_tag(PT_BINARY,      0x35E7));
401
-define('PR_IPM_FAVORITES_ENTRYID'                     ,mapi_prop_tag(PT_BINARY,      0x6630));
402
-define('PR_IPM_PUBLIC_FOLDERS_ENTRYID'                ,mapi_prop_tag(PT_BINARY,      0x6631));
395
+define('PR_IPM_OUTBOX_ENTRYID', mapi_prop_tag(PT_BINARY, 0x35E2));
396
+define('PR_IPM_WASTEBASKET_ENTRYID', mapi_prop_tag(PT_BINARY, 0x35E3));
397
+define('PR_IPM_SENTMAIL_ENTRYID', mapi_prop_tag(PT_BINARY, 0x35E4));
398
+define('PR_VIEWS_ENTRYID', mapi_prop_tag(PT_BINARY, 0x35E5));
399
+define('PR_COMMON_VIEWS_ENTRYID', mapi_prop_tag(PT_BINARY, 0x35E6));
400
+define('PR_FINDER_ENTRYID', mapi_prop_tag(PT_BINARY, 0x35E7));
401
+define('PR_IPM_FAVORITES_ENTRYID', mapi_prop_tag(PT_BINARY, 0x6630));
402
+define('PR_IPM_PUBLIC_FOLDERS_ENTRYID', mapi_prop_tag(PT_BINARY, 0x6631));
403 403
 
404 404
 
405 405
 /* Proptags 0x35E8-0x35FF reserved for folders "guaranteed" by 'PR_VALID_FOLDER_MASK */
@@ -409,31 +409,31 @@  discard block
 block discarded – undo
409 409
  *  Folder and AB Container properties
410 410
  */
411 411
 
412
-define('PR_CONTAINER_FLAGS'                           ,mapi_prop_tag(PT_LONG,        0x3600));
413
-define('PR_FOLDER_TYPE'                               ,mapi_prop_tag(PT_LONG,        0x3601));
414
-define('PR_CONTENT_COUNT'                             ,mapi_prop_tag(PT_LONG,        0x3602));
415
-define('PR_CONTENT_UNREAD'                            ,mapi_prop_tag(PT_LONG,        0x3603));
416
-define('PR_CREATE_TEMPLATES'                          ,mapi_prop_tag(PT_OBJECT,      0x3604));
417
-define('PR_DETAILS_TABLE'                             ,mapi_prop_tag(PT_OBJECT,      0x3605));
418
-define('PR_SEARCH'                                    ,mapi_prop_tag(PT_OBJECT,      0x3607));
419
-define('PR_SELECTABLE'                                ,mapi_prop_tag(PT_BOOLEAN,     0x3609));
420
-define('PR_SUBFOLDERS'                                ,mapi_prop_tag(PT_BOOLEAN,     0x360A));
421
-define('PR_STATUS'                                    ,mapi_prop_tag(PT_LONG,        0x360B));
422
-define('PR_ANR'                                       ,mapi_prop_tag(PT_TSTRING,     0x360C));
423
-define('PR_CONTENTS_SORT_ORDER'                       ,mapi_prop_tag(PT_MV_LONG,     0x360D));
424
-define('PR_CONTAINER_HIERARCHY'                       ,mapi_prop_tag(PT_OBJECT,      0x360E));
425
-define('PR_CONTAINER_CONTENTS'                        ,mapi_prop_tag(PT_OBJECT,      0x360F));
426
-define('PR_FOLDER_ASSOCIATED_CONTENTS'                ,mapi_prop_tag(PT_OBJECT,      0x3610));
427
-define('PR_DEF_CREATE_DL'                             ,mapi_prop_tag(PT_BINARY,      0x3611));
428
-define('PR_DEF_CREATE_MAILUSER'                       ,mapi_prop_tag(PT_BINARY,      0x3612));
429
-define('PR_CONTAINER_CLASS'                           ,mapi_prop_tag(PT_TSTRING,     0x3613));
430
-define('PR_CONTAINER_MODIFY_VERSION'                  ,mapi_prop_tag(PT_I8,          0x3614));
431
-define('PR_AB_PROVIDER_ID'                            ,mapi_prop_tag(PT_BINARY,      0x3615));
432
-define('PR_DEFAULT_VIEW_ENTRYID'                      ,mapi_prop_tag(PT_BINARY,      0x3616));
433
-define('PR_ASSOC_CONTENT_COUNT'                       ,mapi_prop_tag(PT_LONG,        0x3617));
434
-define('PR_EXTENDED_FOLDER_FLAGS'                     ,mapi_prop_tag(PT_BINARY,      0x36DA));
435
-
436
-define('PR_RIGHTS'                                    ,mapi_prop_tag(PT_LONG,        0x6639));
412
+define('PR_CONTAINER_FLAGS', mapi_prop_tag(PT_LONG, 0x3600));
413
+define('PR_FOLDER_TYPE', mapi_prop_tag(PT_LONG, 0x3601));
414
+define('PR_CONTENT_COUNT', mapi_prop_tag(PT_LONG, 0x3602));
415
+define('PR_CONTENT_UNREAD', mapi_prop_tag(PT_LONG, 0x3603));
416
+define('PR_CREATE_TEMPLATES', mapi_prop_tag(PT_OBJECT, 0x3604));
417
+define('PR_DETAILS_TABLE', mapi_prop_tag(PT_OBJECT, 0x3605));
418
+define('PR_SEARCH', mapi_prop_tag(PT_OBJECT, 0x3607));
419
+define('PR_SELECTABLE', mapi_prop_tag(PT_BOOLEAN, 0x3609));
420
+define('PR_SUBFOLDERS', mapi_prop_tag(PT_BOOLEAN, 0x360A));
421
+define('PR_STATUS', mapi_prop_tag(PT_LONG, 0x360B));
422
+define('PR_ANR', mapi_prop_tag(PT_TSTRING, 0x360C));
423
+define('PR_CONTENTS_SORT_ORDER', mapi_prop_tag(PT_MV_LONG, 0x360D));
424
+define('PR_CONTAINER_HIERARCHY', mapi_prop_tag(PT_OBJECT, 0x360E));
425
+define('PR_CONTAINER_CONTENTS', mapi_prop_tag(PT_OBJECT, 0x360F));
426
+define('PR_FOLDER_ASSOCIATED_CONTENTS', mapi_prop_tag(PT_OBJECT, 0x3610));
427
+define('PR_DEF_CREATE_DL', mapi_prop_tag(PT_BINARY, 0x3611));
428
+define('PR_DEF_CREATE_MAILUSER', mapi_prop_tag(PT_BINARY, 0x3612));
429
+define('PR_CONTAINER_CLASS', mapi_prop_tag(PT_TSTRING, 0x3613));
430
+define('PR_CONTAINER_MODIFY_VERSION', mapi_prop_tag(PT_I8, 0x3614));
431
+define('PR_AB_PROVIDER_ID', mapi_prop_tag(PT_BINARY, 0x3615));
432
+define('PR_DEFAULT_VIEW_ENTRYID', mapi_prop_tag(PT_BINARY, 0x3616));
433
+define('PR_ASSOC_CONTENT_COUNT', mapi_prop_tag(PT_LONG, 0x3617));
434
+define('PR_EXTENDED_FOLDER_FLAGS', mapi_prop_tag(PT_BINARY, 0x36DA));
435
+
436
+define('PR_RIGHTS', mapi_prop_tag(PT_LONG, 0x6639));
437 437
 
438 438
 /* Reserved 0x36C0-0x36FF */
439 439
 
@@ -441,273 +441,273 @@  discard block
 block discarded – undo
441 441
  *  Attachment properties
442 442
  */
443 443
 
444
-define('PR_ATTACHMENT_X400_PARAMETERS'                ,mapi_prop_tag(PT_BINARY,      0x3700));
445
-define('PR_ATTACH_DATA_OBJ'                           ,mapi_prop_tag(PT_OBJECT,      0x3701));
446
-define('PR_ATTACH_DATA_BIN'                           ,mapi_prop_tag(PT_BINARY,      0x3701));
447
-define('PR_ATTACH_CONTENT_ID'                         ,mapi_prop_tag(PT_STRING8,     0x3712));
448
-define('PR_ATTACH_CONTENT_ID_W'                       ,mapi_prop_tag(PT_UNICODE,     0x3712));
449
-define('PR_ATTACH_CONTENT_LOCATION'                   ,mapi_prop_tag(PT_STRING8,     0x3713));
450
-define('PR_ATTACH_ENCODING'                           ,mapi_prop_tag(PT_BINARY,      0x3702));
451
-define('PR_ATTACH_EXTENSION'                          ,mapi_prop_tag(PT_TSTRING,     0x3703));
452
-define('PR_ATTACH_FILENAME'                           ,mapi_prop_tag(PT_TSTRING,     0x3704));
453
-define('PR_ATTACH_METHOD'                             ,mapi_prop_tag(PT_LONG,        0x3705));
454
-define('PR_ATTACH_LONG_FILENAME'                      ,mapi_prop_tag(PT_TSTRING,     0x3707));
455
-define('PR_ATTACH_PATHNAME'                           ,mapi_prop_tag(PT_TSTRING,     0x3708));
456
-define('PR_ATTACH_RENDERING'                          ,mapi_prop_tag(PT_BINARY,      0x3709));
457
-define('PR_ATTACH_TAG'                                ,mapi_prop_tag(PT_BINARY,      0x370A));
458
-define('PR_RENDERING_POSITION'                        ,mapi_prop_tag(PT_LONG,        0x370B));
459
-define('PR_ATTACH_TRANSPORT_NAME'                     ,mapi_prop_tag(PT_TSTRING,     0x370C));
460
-define('PR_ATTACH_LONG_PATHNAME'                      ,mapi_prop_tag(PT_TSTRING,     0x370D));
461
-define('PR_ATTACH_MIME_TAG'                           ,mapi_prop_tag(PT_TSTRING,     0x370E));
462
-define('PR_ATTACH_MIME_TAG_W'                         ,mapi_prop_tag(PT_UNICODE,     0x370E));
463
-define('PR_ATTACH_ADDITIONAL_INFO'                    ,mapi_prop_tag(PT_BINARY,      0x370F));
464
-define('PR_ATTACHMENT_FLAGS'                          ,mapi_prop_tag(PT_LONG,        0x7FFD));
465
-define('PR_ATTACHMENT_HIDDEN'                         ,mapi_prop_tag(PT_BOOLEAN,     0x7FFE));
466
-define('PR_ATTACHMENT_LINKID'                         ,mapi_prop_tag(PT_LONG,        0x7FFA));
467
-define('PR_ATTACH_FLAGS'                              ,mapi_prop_tag(PT_LONG,        0x3714));
468
-define('PR_EXCEPTION_STARTTIME'                       ,mapi_prop_tag(PT_SYSTIME,     0x7FFB));
469
-define('PR_EXCEPTION_ENDTIME'                         ,mapi_prop_tag(PT_SYSTIME,     0x7FFC));
444
+define('PR_ATTACHMENT_X400_PARAMETERS', mapi_prop_tag(PT_BINARY, 0x3700));
445
+define('PR_ATTACH_DATA_OBJ', mapi_prop_tag(PT_OBJECT, 0x3701));
446
+define('PR_ATTACH_DATA_BIN', mapi_prop_tag(PT_BINARY, 0x3701));
447
+define('PR_ATTACH_CONTENT_ID', mapi_prop_tag(PT_STRING8, 0x3712));
448
+define('PR_ATTACH_CONTENT_ID_W', mapi_prop_tag(PT_UNICODE, 0x3712));
449
+define('PR_ATTACH_CONTENT_LOCATION', mapi_prop_tag(PT_STRING8, 0x3713));
450
+define('PR_ATTACH_ENCODING', mapi_prop_tag(PT_BINARY, 0x3702));
451
+define('PR_ATTACH_EXTENSION', mapi_prop_tag(PT_TSTRING, 0x3703));
452
+define('PR_ATTACH_FILENAME', mapi_prop_tag(PT_TSTRING, 0x3704));
453
+define('PR_ATTACH_METHOD', mapi_prop_tag(PT_LONG, 0x3705));
454
+define('PR_ATTACH_LONG_FILENAME', mapi_prop_tag(PT_TSTRING, 0x3707));
455
+define('PR_ATTACH_PATHNAME', mapi_prop_tag(PT_TSTRING, 0x3708));
456
+define('PR_ATTACH_RENDERING', mapi_prop_tag(PT_BINARY, 0x3709));
457
+define('PR_ATTACH_TAG', mapi_prop_tag(PT_BINARY, 0x370A));
458
+define('PR_RENDERING_POSITION', mapi_prop_tag(PT_LONG, 0x370B));
459
+define('PR_ATTACH_TRANSPORT_NAME', mapi_prop_tag(PT_TSTRING, 0x370C));
460
+define('PR_ATTACH_LONG_PATHNAME', mapi_prop_tag(PT_TSTRING, 0x370D));
461
+define('PR_ATTACH_MIME_TAG', mapi_prop_tag(PT_TSTRING, 0x370E));
462
+define('PR_ATTACH_MIME_TAG_W', mapi_prop_tag(PT_UNICODE, 0x370E));
463
+define('PR_ATTACH_ADDITIONAL_INFO', mapi_prop_tag(PT_BINARY, 0x370F));
464
+define('PR_ATTACHMENT_FLAGS', mapi_prop_tag(PT_LONG, 0x7FFD));
465
+define('PR_ATTACHMENT_HIDDEN', mapi_prop_tag(PT_BOOLEAN, 0x7FFE));
466
+define('PR_ATTACHMENT_LINKID', mapi_prop_tag(PT_LONG, 0x7FFA));
467
+define('PR_ATTACH_FLAGS', mapi_prop_tag(PT_LONG, 0x3714));
468
+define('PR_EXCEPTION_STARTTIME', mapi_prop_tag(PT_SYSTIME, 0x7FFB));
469
+define('PR_EXCEPTION_ENDTIME', mapi_prop_tag(PT_SYSTIME, 0x7FFC));
470 470
 
471 471
 /*
472 472
  *  AB Object properties
473 473
  */
474 474
 
475
-define('PR_DISPLAY_TYPE'                              ,mapi_prop_tag(PT_LONG,        0x3900));
476
-define('PR_DISPLAY_TYPE_EX'                           ,mapi_prop_tag(PT_LONG,        0x3905));
477
-define('PR_TEMPLATEID'                                ,mapi_prop_tag(PT_BINARY,      0x3902));
478
-define('PR_PRIMARY_CAPABILITY'                        ,mapi_prop_tag(PT_BINARY,      0x3904));
475
+define('PR_DISPLAY_TYPE', mapi_prop_tag(PT_LONG, 0x3900));
476
+define('PR_DISPLAY_TYPE_EX', mapi_prop_tag(PT_LONG, 0x3905));
477
+define('PR_TEMPLATEID', mapi_prop_tag(PT_BINARY, 0x3902));
478
+define('PR_PRIMARY_CAPABILITY', mapi_prop_tag(PT_BINARY, 0x3904));
479 479
 
480 480
 
481 481
 /*
482 482
  *  Mail user properties
483 483
  */
484
-define('PR_7BIT_DISPLAY_NAME'                         ,mapi_prop_tag(PT_STRING8,     0x39FF));
485
-define('PR_ACCOUNT'                                   ,mapi_prop_tag(PT_TSTRING,     0x3A00));
486
-define('PR_ALTERNATE_RECIPIENT'                       ,mapi_prop_tag(PT_BINARY,      0x3A01));
487
-define('PR_CALLBACK_TELEPHONE_NUMBER'                 ,mapi_prop_tag(PT_TSTRING,     0x3A02));
488
-define('PR_CONVERSION_PROHIBITED'                     ,mapi_prop_tag(PT_BOOLEAN,     0x3A03));
489
-define('PR_DISCLOSE_RECIPIENTS'                       ,mapi_prop_tag(PT_BOOLEAN,     0x3A04));
490
-define('PR_GENERATION'                                ,mapi_prop_tag(PT_TSTRING,     0x3A05));
491
-define('PR_GIVEN_NAME'                                ,mapi_prop_tag(PT_TSTRING,     0x3A06));
492
-define('PR_GOVERNMENT_ID_NUMBER'                      ,mapi_prop_tag(PT_TSTRING,     0x3A07));
493
-define('PR_BUSINESS_TELEPHONE_NUMBER'                 ,mapi_prop_tag(PT_TSTRING,     0x3A08));
494
-define('PR_OFFICE_TELEPHONE_NUMBER'                   ,PR_BUSINESS_TELEPHONE_NUMBER);
495
-define('PR_HOME_TELEPHONE_NUMBER'                     ,mapi_prop_tag(PT_TSTRING,     0x3A09));
496
-define('PR_INITIALS'                                  ,mapi_prop_tag(PT_TSTRING,     0x3A0A));
497
-define('PR_KEYWORD'                                   ,mapi_prop_tag(PT_TSTRING,     0x3A0B));
498
-define('PR_LANGUAGE'                                  ,mapi_prop_tag(PT_TSTRING,     0x3A0C));
499
-define('PR_LOCATION'                                  ,mapi_prop_tag(PT_TSTRING,     0x3A0D));
500
-define('PR_MAIL_PERMISSION'                           ,mapi_prop_tag(PT_BOOLEAN,     0x3A0E));
501
-define('PR_MHS_COMMON_NAME'                           ,mapi_prop_tag(PT_TSTRING,     0x3A0F));
502
-define('PR_ORGANIZATIONAL_ID_NUMBER'                  ,mapi_prop_tag(PT_TSTRING,     0x3A10));
503
-define('PR_SURNAME'                                   ,mapi_prop_tag(PT_TSTRING,     0x3A11));
504
-define('PR_ORIGINAL_ENTRYID'                          ,mapi_prop_tag(PT_BINARY,      0x3A12));
505
-define('PR_ORIGINAL_DISPLAY_NAME'                     ,mapi_prop_tag(PT_TSTRING,     0x3A13));
506
-define('PR_ORIGINAL_SEARCH_KEY'                       ,mapi_prop_tag(PT_BINARY,      0x3A14));
507
-define('PR_POSTAL_ADDRESS'                            ,mapi_prop_tag(PT_TSTRING,     0x3A15));
508
-define('PR_COMPANY_NAME'                              ,mapi_prop_tag(PT_TSTRING,     0x3A16));
509
-define('PR_TITLE'                                     ,mapi_prop_tag(PT_TSTRING,     0x3A17));
510
-define('PR_DEPARTMENT_NAME'                           ,mapi_prop_tag(PT_TSTRING,     0x3A18));
511
-define('PR_OFFICE_LOCATION'                           ,mapi_prop_tag(PT_TSTRING,     0x3A19));
512
-define('PR_PRIMARY_TELEPHONE_NUMBER'                  ,mapi_prop_tag(PT_TSTRING,     0x3A1A));
513
-define('PR_BUSINESS2_TELEPHONE_NUMBER'                ,mapi_prop_tag(PT_TSTRING,     0x3A1B));
514
-define('PR_OFFICE2_TELEPHONE_NUMBER'                  ,PR_BUSINESS2_TELEPHONE_NUMBER);
515
-define('PR_MOBILE_TELEPHONE_NUMBER'                   ,mapi_prop_tag(PT_TSTRING,     0x3A1C));
516
-define('PR_CELLULAR_TELEPHONE_NUMBER'                 ,PR_MOBILE_TELEPHONE_NUMBER);
517
-define('PR_RADIO_TELEPHONE_NUMBER'                    ,mapi_prop_tag(PT_TSTRING,     0x3A1D));
518
-define('PR_CAR_TELEPHONE_NUMBER'                      ,mapi_prop_tag(PT_TSTRING,     0x3A1E));
519
-define('PR_OTHER_TELEPHONE_NUMBER'                    ,mapi_prop_tag(PT_TSTRING,     0x3A1F));
520
-define('PR_TRANSMITABLE_DISPLAY_NAME'                 ,mapi_prop_tag(PT_TSTRING,     0x3A20));
521
-define('PR_PAGER_TELEPHONE_NUMBER'                    ,mapi_prop_tag(PT_TSTRING,     0x3A21));
522
-define('PR_BEEPER_TELEPHONE_NUMBER'                   ,PR_PAGER_TELEPHONE_NUMBER);
523
-define('PR_USER_CERTIFICATE'                          ,mapi_prop_tag(PT_BINARY,      0x3A22));
524
-define('PR_PRIMARY_FAX_NUMBER'                        ,mapi_prop_tag(PT_TSTRING,     0x3A23));
525
-define('PR_BUSINESS_FAX_NUMBER'                       ,mapi_prop_tag(PT_TSTRING,     0x3A24));
526
-define('PR_HOME_FAX_NUMBER'                           ,mapi_prop_tag(PT_TSTRING,     0x3A25));
527
-define('PR_COUNTRY'                                   ,mapi_prop_tag(PT_TSTRING,     0x3A26));
528
-define('PR_BUSINESS_ADDRESS_COUNTRY'                  ,PR_COUNTRY);
484
+define('PR_7BIT_DISPLAY_NAME', mapi_prop_tag(PT_STRING8, 0x39FF));
485
+define('PR_ACCOUNT', mapi_prop_tag(PT_TSTRING, 0x3A00));
486
+define('PR_ALTERNATE_RECIPIENT', mapi_prop_tag(PT_BINARY, 0x3A01));
487
+define('PR_CALLBACK_TELEPHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A02));
488
+define('PR_CONVERSION_PROHIBITED', mapi_prop_tag(PT_BOOLEAN, 0x3A03));
489
+define('PR_DISCLOSE_RECIPIENTS', mapi_prop_tag(PT_BOOLEAN, 0x3A04));
490
+define('PR_GENERATION', mapi_prop_tag(PT_TSTRING, 0x3A05));
491
+define('PR_GIVEN_NAME', mapi_prop_tag(PT_TSTRING, 0x3A06));
492
+define('PR_GOVERNMENT_ID_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A07));
493
+define('PR_BUSINESS_TELEPHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A08));
494
+define('PR_OFFICE_TELEPHONE_NUMBER', PR_BUSINESS_TELEPHONE_NUMBER);
495
+define('PR_HOME_TELEPHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A09));
496
+define('PR_INITIALS', mapi_prop_tag(PT_TSTRING, 0x3A0A));
497
+define('PR_KEYWORD', mapi_prop_tag(PT_TSTRING, 0x3A0B));
498
+define('PR_LANGUAGE', mapi_prop_tag(PT_TSTRING, 0x3A0C));
499
+define('PR_LOCATION', mapi_prop_tag(PT_TSTRING, 0x3A0D));
500
+define('PR_MAIL_PERMISSION', mapi_prop_tag(PT_BOOLEAN, 0x3A0E));
501
+define('PR_MHS_COMMON_NAME', mapi_prop_tag(PT_TSTRING, 0x3A0F));
502
+define('PR_ORGANIZATIONAL_ID_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A10));
503
+define('PR_SURNAME', mapi_prop_tag(PT_TSTRING, 0x3A11));
504
+define('PR_ORIGINAL_ENTRYID', mapi_prop_tag(PT_BINARY, 0x3A12));
505
+define('PR_ORIGINAL_DISPLAY_NAME', mapi_prop_tag(PT_TSTRING, 0x3A13));
506
+define('PR_ORIGINAL_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x3A14));
507
+define('PR_POSTAL_ADDRESS', mapi_prop_tag(PT_TSTRING, 0x3A15));
508
+define('PR_COMPANY_NAME', mapi_prop_tag(PT_TSTRING, 0x3A16));
509
+define('PR_TITLE', mapi_prop_tag(PT_TSTRING, 0x3A17));
510
+define('PR_DEPARTMENT_NAME', mapi_prop_tag(PT_TSTRING, 0x3A18));
511
+define('PR_OFFICE_LOCATION', mapi_prop_tag(PT_TSTRING, 0x3A19));
512
+define('PR_PRIMARY_TELEPHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A1A));
513
+define('PR_BUSINESS2_TELEPHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A1B));
514
+define('PR_OFFICE2_TELEPHONE_NUMBER', PR_BUSINESS2_TELEPHONE_NUMBER);
515
+define('PR_MOBILE_TELEPHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A1C));
516
+define('PR_CELLULAR_TELEPHONE_NUMBER', PR_MOBILE_TELEPHONE_NUMBER);
517
+define('PR_RADIO_TELEPHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A1D));
518
+define('PR_CAR_TELEPHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A1E));
519
+define('PR_OTHER_TELEPHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A1F));
520
+define('PR_TRANSMITABLE_DISPLAY_NAME', mapi_prop_tag(PT_TSTRING, 0x3A20));
521
+define('PR_PAGER_TELEPHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A21));
522
+define('PR_BEEPER_TELEPHONE_NUMBER', PR_PAGER_TELEPHONE_NUMBER);
523
+define('PR_USER_CERTIFICATE', mapi_prop_tag(PT_BINARY, 0x3A22));
524
+define('PR_PRIMARY_FAX_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A23));
525
+define('PR_BUSINESS_FAX_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A24));
526
+define('PR_HOME_FAX_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A25));
527
+define('PR_COUNTRY', mapi_prop_tag(PT_TSTRING, 0x3A26));
528
+define('PR_BUSINESS_ADDRESS_COUNTRY', PR_COUNTRY);
529 529
 
530
-define('PR_FLAG_STATUS'                               ,mapi_prop_tag(PT_LONG,        0x1090));
531
-define('PR_FLAG_COMPLETE_TIME'                        ,mapi_prop_tag(PT_SYSTIME,     0x1091));
532
-define('PR_FLAG_ICON'                                 ,mapi_prop_tag(PT_LONG,        0x1095));
533
-define('PR_BLOCK_STATUS'                              ,mapi_prop_tag(PT_LONG,        0x1096));
530
+define('PR_FLAG_STATUS', mapi_prop_tag(PT_LONG, 0x1090));
531
+define('PR_FLAG_COMPLETE_TIME', mapi_prop_tag(PT_SYSTIME, 0x1091));
532
+define('PR_FLAG_ICON', mapi_prop_tag(PT_LONG, 0x1095));
533
+define('PR_BLOCK_STATUS', mapi_prop_tag(PT_LONG, 0x1096));
534 534
 
535
-define('PR_LOCALITY'                                  ,mapi_prop_tag(PT_TSTRING,     0x3A27));
536
-define('PR_BUSINESS_ADDRESS_CITY'                     ,PR_LOCALITY);
535
+define('PR_LOCALITY', mapi_prop_tag(PT_TSTRING, 0x3A27));
536
+define('PR_BUSINESS_ADDRESS_CITY', PR_LOCALITY);
537 537
 
538
-define('PR_STATE_OR_PROVINCE'                         ,mapi_prop_tag(PT_TSTRING,     0x3A28));
539
-define('PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE'        ,PR_STATE_OR_PROVINCE);
538
+define('PR_STATE_OR_PROVINCE', mapi_prop_tag(PT_TSTRING, 0x3A28));
539
+define('PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE', PR_STATE_OR_PROVINCE);
540 540
 
541
-define('PR_STREET_ADDRESS'                            ,mapi_prop_tag(PT_TSTRING,     0x3A29));
542
-define('PR_BUSINESS_ADDRESS_STREET'                   ,PR_STREET_ADDRESS);
541
+define('PR_STREET_ADDRESS', mapi_prop_tag(PT_TSTRING, 0x3A29));
542
+define('PR_BUSINESS_ADDRESS_STREET', PR_STREET_ADDRESS);
543 543
 
544
-define('PR_POSTAL_CODE'                               ,mapi_prop_tag(PT_TSTRING,     0x3A2A));
545
-define('PR_BUSINESS_ADDRESS_POSTAL_CODE'              ,PR_POSTAL_CODE);
544
+define('PR_POSTAL_CODE', mapi_prop_tag(PT_TSTRING, 0x3A2A));
545
+define('PR_BUSINESS_ADDRESS_POSTAL_CODE', PR_POSTAL_CODE);
546 546
 
547 547
 
548
-define('PR_POST_OFFICE_BOX'                           ,mapi_prop_tag(PT_TSTRING,     0x3A2B));
549
-define('PR_BUSINESS_ADDRESS_POST_OFFICE_BOX'          ,PR_POST_OFFICE_BOX);
548
+define('PR_POST_OFFICE_BOX', mapi_prop_tag(PT_TSTRING, 0x3A2B));
549
+define('PR_BUSINESS_ADDRESS_POST_OFFICE_BOX', PR_POST_OFFICE_BOX);
550 550
 
551 551
 
552
-define('PR_TELEX_NUMBER'                              ,mapi_prop_tag(PT_TSTRING,     0x3A2C));
553
-define('PR_ISDN_NUMBER'                               ,mapi_prop_tag(PT_TSTRING,     0x3A2D));
554
-define('PR_ASSISTANT_TELEPHONE_NUMBER'                ,mapi_prop_tag(PT_TSTRING,     0x3A2E));
555
-define('PR_HOME2_TELEPHONE_NUMBER'                    ,mapi_prop_tag(PT_TSTRING,     0x3A2F));
556
-define('PR_ASSISTANT'                                 ,mapi_prop_tag(PT_TSTRING,     0x3A30));
557
-define('PR_SEND_RICH_INFO'                            ,mapi_prop_tag(PT_BOOLEAN,     0x3A40));
558
-define('PR_WEDDING_ANNIVERSARY'                       ,mapi_prop_tag(PT_SYSTIME,     0x3A41));
559
-define('PR_BIRTHDAY'                                  ,mapi_prop_tag(PT_SYSTIME,     0x3A42));
552
+define('PR_TELEX_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A2C));
553
+define('PR_ISDN_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A2D));
554
+define('PR_ASSISTANT_TELEPHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A2E));
555
+define('PR_HOME2_TELEPHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A2F));
556
+define('PR_ASSISTANT', mapi_prop_tag(PT_TSTRING, 0x3A30));
557
+define('PR_SEND_RICH_INFO', mapi_prop_tag(PT_BOOLEAN, 0x3A40));
558
+define('PR_WEDDING_ANNIVERSARY', mapi_prop_tag(PT_SYSTIME, 0x3A41));
559
+define('PR_BIRTHDAY', mapi_prop_tag(PT_SYSTIME, 0x3A42));
560 560
 
561 561
 
562
-define('PR_HOBBIES'                                   ,mapi_prop_tag(PT_TSTRING,     0x3A43));
562
+define('PR_HOBBIES', mapi_prop_tag(PT_TSTRING, 0x3A43));
563 563
 
564
-define('PR_MIDDLE_NAME'                               ,mapi_prop_tag(PT_TSTRING,     0x3A44));
564
+define('PR_MIDDLE_NAME', mapi_prop_tag(PT_TSTRING, 0x3A44));
565 565
 
566
-define('PR_DISPLAY_NAME_PREFIX'                       ,mapi_prop_tag(PT_TSTRING,     0x3A45));
566
+define('PR_DISPLAY_NAME_PREFIX', mapi_prop_tag(PT_TSTRING, 0x3A45));
567 567
 
568
-define('PR_PROFESSION'                                ,mapi_prop_tag(PT_TSTRING,     0x3A46));
568
+define('PR_PROFESSION', mapi_prop_tag(PT_TSTRING, 0x3A46));
569 569
 
570
-define('PR_PREFERRED_BY_NAME'                         ,mapi_prop_tag(PT_TSTRING,     0x3A47));
570
+define('PR_PREFERRED_BY_NAME', mapi_prop_tag(PT_TSTRING, 0x3A47));
571 571
 
572
-define('PR_SPOUSE_NAME'                               ,mapi_prop_tag(PT_TSTRING,     0x3A48));
572
+define('PR_SPOUSE_NAME', mapi_prop_tag(PT_TSTRING, 0x3A48));
573 573
 
574
-define('PR_COMPUTER_NETWORK_NAME'                     ,mapi_prop_tag(PT_TSTRING,     0x3A49));
574
+define('PR_COMPUTER_NETWORK_NAME', mapi_prop_tag(PT_TSTRING, 0x3A49));
575 575
 
576
-define('PR_CUSTOMER_ID'                               ,mapi_prop_tag(PT_TSTRING,     0x3A4A));
576
+define('PR_CUSTOMER_ID', mapi_prop_tag(PT_TSTRING, 0x3A4A));
577 577
 
578
-define('PR_TTYTDD_PHONE_NUMBER'                       ,mapi_prop_tag(PT_TSTRING,     0x3A4B));
578
+define('PR_TTYTDD_PHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A4B));
579 579
 
580
-define('PR_FTP_SITE'                                  ,mapi_prop_tag(PT_TSTRING,     0x3A4C));
580
+define('PR_FTP_SITE', mapi_prop_tag(PT_TSTRING, 0x3A4C));
581 581
 
582
-define('PR_GENDER'                                    ,mapi_prop_tag(PT_SHORT,       0x3A4D));
582
+define('PR_GENDER', mapi_prop_tag(PT_SHORT, 0x3A4D));
583 583
 
584
-define('PR_MANAGER_NAME'                              ,mapi_prop_tag(PT_TSTRING,     0x3A4E));
584
+define('PR_MANAGER_NAME', mapi_prop_tag(PT_TSTRING, 0x3A4E));
585 585
 
586
-define('PR_NICKNAME'                                  ,mapi_prop_tag(PT_TSTRING,     0x3A4F));
586
+define('PR_NICKNAME', mapi_prop_tag(PT_TSTRING, 0x3A4F));
587 587
 
588
-define('PR_PERSONAL_HOME_PAGE'                        ,mapi_prop_tag(PT_TSTRING,     0x3A50));
588
+define('PR_PERSONAL_HOME_PAGE', mapi_prop_tag(PT_TSTRING, 0x3A50));
589 589
 
590 590
 
591
-define('PR_BUSINESS_HOME_PAGE'                        ,mapi_prop_tag(PT_TSTRING,     0x3A51));
591
+define('PR_BUSINESS_HOME_PAGE', mapi_prop_tag(PT_TSTRING, 0x3A51));
592 592
 
593
-define('PR_CONTACT_VERSION'                           ,mapi_prop_tag(PT_CLSID,       0x3A52));
594
-define('PR_CONTACT_ENTRYIDS'                          ,mapi_prop_tag(PT_MV_BINARY,   0x3A53));
593
+define('PR_CONTACT_VERSION', mapi_prop_tag(PT_CLSID, 0x3A52));
594
+define('PR_CONTACT_ENTRYIDS', mapi_prop_tag(PT_MV_BINARY, 0x3A53));
595 595
 
596
-define('PR_CONTACT_ADDRTYPES'                         ,mapi_prop_tag(PT_MV_TSTRING,  0x3A54));
596
+define('PR_CONTACT_ADDRTYPES', mapi_prop_tag(PT_MV_TSTRING, 0x3A54));
597 597
 
598
-define('PR_CONTACT_DEFAULT_ADDRESS_INDEX'             ,mapi_prop_tag(PT_LONG,        0x3A55));
598
+define('PR_CONTACT_DEFAULT_ADDRESS_INDEX', mapi_prop_tag(PT_LONG, 0x3A55));
599 599
 
600
-define('PR_CONTACT_EMAIL_ADDRESSES'                   ,mapi_prop_tag(PT_MV_TSTRING,  0x3A56));
601
-define('PR_ATTACHMENT_CONTACTPHOTO'                   ,mapi_prop_tag(PT_BOOLEAN,     0x7FFF));
600
+define('PR_CONTACT_EMAIL_ADDRESSES', mapi_prop_tag(PT_MV_TSTRING, 0x3A56));
601
+define('PR_ATTACHMENT_CONTACTPHOTO', mapi_prop_tag(PT_BOOLEAN, 0x7FFF));
602 602
 
603 603
 
604
-define('PR_COMPANY_MAIN_PHONE_NUMBER'                 ,mapi_prop_tag(PT_TSTRING,     0x3A57));
604
+define('PR_COMPANY_MAIN_PHONE_NUMBER', mapi_prop_tag(PT_TSTRING, 0x3A57));
605 605
 
606
-define('PR_CHILDRENS_NAMES'                           ,mapi_prop_tag(PT_MV_TSTRING,  0x3A58));
606
+define('PR_CHILDRENS_NAMES', mapi_prop_tag(PT_MV_TSTRING, 0x3A58));
607 607
 
608 608
 
609 609
 
610
-define('PR_HOME_ADDRESS_CITY'                         ,mapi_prop_tag(PT_TSTRING,     0x3A59));
610
+define('PR_HOME_ADDRESS_CITY', mapi_prop_tag(PT_TSTRING, 0x3A59));
611 611
 
612
-define('PR_HOME_ADDRESS_COUNTRY'                      ,mapi_prop_tag(PT_TSTRING,     0x3A5A));
612
+define('PR_HOME_ADDRESS_COUNTRY', mapi_prop_tag(PT_TSTRING, 0x3A5A));
613 613
 
614
-define('PR_HOME_ADDRESS_POSTAL_CODE'                  ,mapi_prop_tag(PT_TSTRING,     0x3A5B));
614
+define('PR_HOME_ADDRESS_POSTAL_CODE', mapi_prop_tag(PT_TSTRING, 0x3A5B));
615 615
 
616
-define('PR_HOME_ADDRESS_STATE_OR_PROVINCE'            ,mapi_prop_tag(PT_TSTRING,     0x3A5C));
616
+define('PR_HOME_ADDRESS_STATE_OR_PROVINCE', mapi_prop_tag(PT_TSTRING, 0x3A5C));
617 617
 
618
-define('PR_HOME_ADDRESS_STREET'                       ,mapi_prop_tag(PT_TSTRING,     0x3A5D));
618
+define('PR_HOME_ADDRESS_STREET', mapi_prop_tag(PT_TSTRING, 0x3A5D));
619 619
 
620
-define('PR_HOME_ADDRESS_POST_OFFICE_BOX'              ,mapi_prop_tag(PT_TSTRING,     0x3A5E));
620
+define('PR_HOME_ADDRESS_POST_OFFICE_BOX', mapi_prop_tag(PT_TSTRING, 0x3A5E));
621 621
 
622
-define('PR_OTHER_ADDRESS_CITY'                        ,mapi_prop_tag(PT_TSTRING,     0x3A5F));
622
+define('PR_OTHER_ADDRESS_CITY', mapi_prop_tag(PT_TSTRING, 0x3A5F));
623 623
 
624
-define('PR_OTHER_ADDRESS_COUNTRY'                     ,mapi_prop_tag(PT_TSTRING,     0x3A60));
624
+define('PR_OTHER_ADDRESS_COUNTRY', mapi_prop_tag(PT_TSTRING, 0x3A60));
625 625
 
626
-define('PR_OTHER_ADDRESS_POSTAL_CODE'                 ,mapi_prop_tag(PT_TSTRING,     0x3A61));
626
+define('PR_OTHER_ADDRESS_POSTAL_CODE', mapi_prop_tag(PT_TSTRING, 0x3A61));
627 627
 
628
-define('PR_OTHER_ADDRESS_STATE_OR_PROVINCE'           ,mapi_prop_tag(PT_TSTRING,     0x3A62));
628
+define('PR_OTHER_ADDRESS_STATE_OR_PROVINCE', mapi_prop_tag(PT_TSTRING, 0x3A62));
629 629
 
630
-define('PR_OTHER_ADDRESS_STREET'                      ,mapi_prop_tag(PT_TSTRING,     0x3A63));
630
+define('PR_OTHER_ADDRESS_STREET', mapi_prop_tag(PT_TSTRING, 0x3A63));
631 631
 
632
-define('PR_OTHER_ADDRESS_POST_OFFICE_BOX'             ,mapi_prop_tag(PT_TSTRING,     0x3A64));
632
+define('PR_OTHER_ADDRESS_POST_OFFICE_BOX', mapi_prop_tag(PT_TSTRING, 0x3A64));
633 633
 
634
-define('PR_USER_X509_CERTIFICATE'                     ,mapi_prop_tag(PT_MV_BINARY,   0x3A70));
634
+define('PR_USER_X509_CERTIFICATE', mapi_prop_tag(PT_MV_BINARY, 0x3A70));
635 635
 
636 636
 /*
637 637
  *  Profile section properties
638 638
  */
639 639
 
640
-define('PR_STORE_PROVIDERS'                           ,mapi_prop_tag(PT_BINARY,      0x3D00));
641
-define('PR_AB_PROVIDERS'                              ,mapi_prop_tag(PT_BINARY,      0x3D01));
642
-define('PR_TRANSPORT_PROVIDERS'                       ,mapi_prop_tag(PT_BINARY,      0x3D02));
643
-
644
-define('PR_DEFAULT_PROFILE'                           ,mapi_prop_tag(PT_BOOLEAN,     0x3D04));
645
-define('PR_AB_SEARCH_PATH'                            ,mapi_prop_tag(PT_MV_BINARY,   0x3D05));
646
-define('PR_AB_DEFAULT_DIR'                            ,mapi_prop_tag(PT_BINARY,      0x3D06));
647
-define('PR_AB_DEFAULT_PAB'                            ,mapi_prop_tag(PT_BINARY,      0x3D07));
648
-
649
-define('PR_FILTERING_HOOKS'                           ,mapi_prop_tag(PT_BINARY,      0x3D08));
650
-define('PR_SERVICE_NAME'                              ,mapi_prop_tag(PT_TSTRING,     0x3D09));
651
-define('PR_SERVICE_DLL_NAME'                          ,mapi_prop_tag(PT_TSTRING,     0x3D0A));
652
-define('PR_SERVICE_ENTRY_NAME'                        ,mapi_prop_tag(PT_STRING8,     0x3D0B));
653
-define('PR_SERVICE_UID'                               ,mapi_prop_tag(PT_BINARY,      0x3D0C));
654
-define('PR_SERVICE_EXTRA_UIDS'                        ,mapi_prop_tag(PT_BINARY,      0x3D0D));
655
-define('PR_SERVICES'                                  ,mapi_prop_tag(PT_BINARY,      0x3D0E));
656
-define('PR_SERVICE_SUPPORT_FILES'                     ,mapi_prop_tag(PT_MV_TSTRING,  0x3D0F));
657
-define('PR_SERVICE_DELETE_FILES'                      ,mapi_prop_tag(PT_MV_TSTRING,  0x3D10));
658
-define('PR_AB_SEARCH_PATH_UPDATE'                     ,mapi_prop_tag(PT_BINARY,      0x3D11));
659
-define('PR_PROFILE_NAME'                              ,mapi_prop_tag(PT_TSTRING,     0x3D12));
640
+define('PR_STORE_PROVIDERS', mapi_prop_tag(PT_BINARY, 0x3D00));
641
+define('PR_AB_PROVIDERS', mapi_prop_tag(PT_BINARY, 0x3D01));
642
+define('PR_TRANSPORT_PROVIDERS', mapi_prop_tag(PT_BINARY, 0x3D02));
643
+
644
+define('PR_DEFAULT_PROFILE', mapi_prop_tag(PT_BOOLEAN, 0x3D04));
645
+define('PR_AB_SEARCH_PATH', mapi_prop_tag(PT_MV_BINARY, 0x3D05));
646
+define('PR_AB_DEFAULT_DIR', mapi_prop_tag(PT_BINARY, 0x3D06));
647
+define('PR_AB_DEFAULT_PAB', mapi_prop_tag(PT_BINARY, 0x3D07));
648
+
649
+define('PR_FILTERING_HOOKS', mapi_prop_tag(PT_BINARY, 0x3D08));
650
+define('PR_SERVICE_NAME', mapi_prop_tag(PT_TSTRING, 0x3D09));
651
+define('PR_SERVICE_DLL_NAME', mapi_prop_tag(PT_TSTRING, 0x3D0A));
652
+define('PR_SERVICE_ENTRY_NAME', mapi_prop_tag(PT_STRING8, 0x3D0B));
653
+define('PR_SERVICE_UID', mapi_prop_tag(PT_BINARY, 0x3D0C));
654
+define('PR_SERVICE_EXTRA_UIDS', mapi_prop_tag(PT_BINARY, 0x3D0D));
655
+define('PR_SERVICES', mapi_prop_tag(PT_BINARY, 0x3D0E));
656
+define('PR_SERVICE_SUPPORT_FILES', mapi_prop_tag(PT_MV_TSTRING, 0x3D0F));
657
+define('PR_SERVICE_DELETE_FILES', mapi_prop_tag(PT_MV_TSTRING, 0x3D10));
658
+define('PR_AB_SEARCH_PATH_UPDATE', mapi_prop_tag(PT_BINARY, 0x3D11));
659
+define('PR_PROFILE_NAME', mapi_prop_tag(PT_TSTRING, 0x3D12));
660 660
 
661 661
 /*
662 662
  *  Status object properties
663 663
  */
664 664
 
665
-define('PR_IDENTITY_DISPLAY'                          ,mapi_prop_tag(PT_TSTRING,     0x3E00));
666
-define('PR_IDENTITY_ENTRYID'                          ,mapi_prop_tag(PT_BINARY,      0x3E01));
667
-define('PR_RESOURCE_METHODS'                          ,mapi_prop_tag(PT_LONG,        0x3E02));
668
-define('PR_RESOURCE_TYPE'                             ,mapi_prop_tag(PT_LONG,        0x3E03));
669
-define('PR_STATUS_CODE'                               ,mapi_prop_tag(PT_LONG,        0x3E04));
670
-define('PR_IDENTITY_SEARCH_KEY'                       ,mapi_prop_tag(PT_BINARY,      0x3E05));
671
-define('PR_OWN_STORE_ENTRYID'                         ,mapi_prop_tag(PT_BINARY,      0x3E06));
672
-define('PR_RESOURCE_PATH'                             ,mapi_prop_tag(PT_TSTRING,     0x3E07));
673
-define('PR_STATUS_STRING'                             ,mapi_prop_tag(PT_TSTRING,     0x3E08));
674
-define('PR_X400_DEFERRED_DELIVERY_CANCEL'             ,mapi_prop_tag(PT_BOOLEAN,     0x3E09));
675
-define('PR_HEADER_FOLDER_ENTRYID'                     ,mapi_prop_tag(PT_BINARY,      0x3E0A));
676
-define('PR_REMOTE_PROGRESS'                           ,mapi_prop_tag(PT_LONG,        0x3E0B));
677
-define('PR_REMOTE_PROGRESS_TEXT'                      ,mapi_prop_tag(PT_TSTRING,     0x3E0C));
678
-define('PR_REMOTE_VALIDATE_OK'                        ,mapi_prop_tag(PT_BOOLEAN,     0x3E0D));
665
+define('PR_IDENTITY_DISPLAY', mapi_prop_tag(PT_TSTRING, 0x3E00));
666
+define('PR_IDENTITY_ENTRYID', mapi_prop_tag(PT_BINARY, 0x3E01));
667
+define('PR_RESOURCE_METHODS', mapi_prop_tag(PT_LONG, 0x3E02));
668
+define('PR_RESOURCE_TYPE', mapi_prop_tag(PT_LONG, 0x3E03));
669
+define('PR_STATUS_CODE', mapi_prop_tag(PT_LONG, 0x3E04));
670
+define('PR_IDENTITY_SEARCH_KEY', mapi_prop_tag(PT_BINARY, 0x3E05));
671
+define('PR_OWN_STORE_ENTRYID', mapi_prop_tag(PT_BINARY, 0x3E06));
672
+define('PR_RESOURCE_PATH', mapi_prop_tag(PT_TSTRING, 0x3E07));
673
+define('PR_STATUS_STRING', mapi_prop_tag(PT_TSTRING, 0x3E08));
674
+define('PR_X400_DEFERRED_DELIVERY_CANCEL', mapi_prop_tag(PT_BOOLEAN, 0x3E09));
675
+define('PR_HEADER_FOLDER_ENTRYID', mapi_prop_tag(PT_BINARY, 0x3E0A));
676
+define('PR_REMOTE_PROGRESS', mapi_prop_tag(PT_LONG, 0x3E0B));
677
+define('PR_REMOTE_PROGRESS_TEXT', mapi_prop_tag(PT_TSTRING, 0x3E0C));
678
+define('PR_REMOTE_VALIDATE_OK', mapi_prop_tag(PT_BOOLEAN, 0x3E0D));
679 679
 
680 680
 /*
681 681
  * Display table properties
682 682
  */
683 683
 
684
-define('PR_CONTROL_FLAGS'                             ,mapi_prop_tag(PT_LONG,        0x3F00));
685
-define('PR_CONTROL_STRUCTURE'                         ,mapi_prop_tag(PT_BINARY,      0x3F01));
686
-define('PR_CONTROL_TYPE'                              ,mapi_prop_tag(PT_LONG,        0x3F02));
687
-define('PR_DELTAX'                                    ,mapi_prop_tag(PT_LONG,        0x3F03));
688
-define('PR_DELTAY'                                    ,mapi_prop_tag(PT_LONG,        0x3F04));
689
-define('PR_XPOS'                                      ,mapi_prop_tag(PT_LONG,        0x3F05));
690
-define('PR_YPOS'                                      ,mapi_prop_tag(PT_LONG,        0x3F06));
691
-define('PR_CONTROL_ID'                                ,mapi_prop_tag(PT_BINARY,      0x3F07));
692
-define('PR_INITIAL_DETAILS_PANE'                      ,mapi_prop_tag(PT_LONG,        0x3F08));
684
+define('PR_CONTROL_FLAGS', mapi_prop_tag(PT_LONG, 0x3F00));
685
+define('PR_CONTROL_STRUCTURE', mapi_prop_tag(PT_BINARY, 0x3F01));
686
+define('PR_CONTROL_TYPE', mapi_prop_tag(PT_LONG, 0x3F02));
687
+define('PR_DELTAX', mapi_prop_tag(PT_LONG, 0x3F03));
688
+define('PR_DELTAY', mapi_prop_tag(PT_LONG, 0x3F04));
689
+define('PR_XPOS', mapi_prop_tag(PT_LONG, 0x3F05));
690
+define('PR_YPOS', mapi_prop_tag(PT_LONG, 0x3F06));
691
+define('PR_CONTROL_ID', mapi_prop_tag(PT_BINARY, 0x3F07));
692
+define('PR_INITIAL_DETAILS_PANE', mapi_prop_tag(PT_LONG, 0x3F08));
693 693
 
694 694
 /*
695 695
  * Secure property id range
696 696
  */
697 697
 
698
-define('PROP_ID_SECURE_MIN'                           ,0x67F0);
699
-define('PROP_ID_SECURE_MAX'                           ,0x67FF);
698
+define('PROP_ID_SECURE_MIN', 0x67F0);
699
+define('PROP_ID_SECURE_MAX', 0x67FF);
700 700
 
701 701
 /*
702 702
  * Extra properties
703 703
  */
704 704
 
705
-define('PR_IPM_APPOINTMENT_ENTRYID'                   ,mapi_prop_tag(PT_BINARY,      0x36D0));
706
-define('PR_IPM_CONTACT_ENTRYID'                       ,mapi_prop_tag(PT_BINARY,      0x36D1));
707
-define('PR_IPM_JOURNAL_ENTRYID'                       ,mapi_prop_tag(PT_BINARY,      0x36D2));
708
-define('PR_IPM_NOTE_ENTRYID'                          ,mapi_prop_tag(PT_BINARY,      0x36D3));
709
-define('PR_IPM_TASK_ENTRYID'                          ,mapi_prop_tag(PT_BINARY,      0x36D4));
710
-define('PR_IPM_DRAFTS_ENTRYID'                        ,mapi_prop_tag(PT_BINARY,      0x36D7));
705
+define('PR_IPM_APPOINTMENT_ENTRYID', mapi_prop_tag(PT_BINARY, 0x36D0));
706
+define('PR_IPM_CONTACT_ENTRYID', mapi_prop_tag(PT_BINARY, 0x36D1));
707
+define('PR_IPM_JOURNAL_ENTRYID', mapi_prop_tag(PT_BINARY, 0x36D2));
708
+define('PR_IPM_NOTE_ENTRYID', mapi_prop_tag(PT_BINARY, 0x36D3));
709
+define('PR_IPM_TASK_ENTRYID', mapi_prop_tag(PT_BINARY, 0x36D4));
710
+define('PR_IPM_DRAFTS_ENTRYID', mapi_prop_tag(PT_BINARY, 0x36D7));
711 711
 /*
712 712
 PR_ADDITIONAL_REN_ENTRYIDS:
713 713
     This is a multivalued property which contains entry IDs for certain special folders.
@@ -719,11 +719,11 @@  discard block
 block discarded – undo
719 719
         4 - Junk E-mail Folder
720 720
         5 - sfSpamTagDontUse (unknown what this is, disable olk spam stuff?)
721 721
 */
722
-define('PR_ADDITIONAL_REN_ENTRYIDS'                   ,mapi_prop_tag(PT_MV_BINARY,   0x36D8));
723
-define('PR_FREEBUSY_ENTRYIDS'                         ,mapi_prop_tag(PT_MV_BINARY,   0x36E4));
724
-define('PR_REM_ONLINE_ENTRYID'                        ,mapi_prop_tag(PT_BINARY,      0x36D5));
725
-define('PR_REM_OFFLINE_ENTRYID'                       ,mapi_prop_tag(PT_BINARY,      0x36D6));
726
-define('PR_FREEBUSY_COUNT_MONTHS'                     ,mapi_prop_tag(PT_LONG,        0x6869));
722
+define('PR_ADDITIONAL_REN_ENTRYIDS', mapi_prop_tag(PT_MV_BINARY, 0x36D8));
723
+define('PR_FREEBUSY_ENTRYIDS', mapi_prop_tag(PT_MV_BINARY, 0x36E4));
724
+define('PR_REM_ONLINE_ENTRYID', mapi_prop_tag(PT_BINARY, 0x36D5));
725
+define('PR_REM_OFFLINE_ENTRYID', mapi_prop_tag(PT_BINARY, 0x36D6));
726
+define('PR_FREEBUSY_COUNT_MONTHS', mapi_prop_tag(PT_LONG, 0x6869));
727 727
 /*
728 728
 PR_IPM_OL2007_ENTRYIDS:
729 729
     This is a single binary property containing the entryids for:
@@ -755,10 +755,10 @@  discard block
 block discarded – undo
755 755
     00000000B774162F0098C84182DE9E4358E4249D01000B41FF66083D464EA7E34D6026C9B143000000006DDA0000 (entryid)
756 756
     00000000 (terminator?)
757 757
 */
758
-define('PR_IPM_OL2007_ENTRYIDS'                       ,mapi_prop_tag(PT_BINARY,      0x36D9));
758
+define('PR_IPM_OL2007_ENTRYIDS', mapi_prop_tag(PT_BINARY, 0x36D9));
759 759
 // Note: PR_IPM_OL2007_ENTRYIDS is the same property as PR_ADDITIONAL_REN_ENTRYIDS_EX, but Microsoft
760 760
 // seems to use the latter hence we will also use that to not confuse developers that want to Google it.
761
-define('PR_ADDITIONAL_REN_ENTRYIDS_EX'                ,mapi_prop_tag(PT_BINARY,      0x36D9));
761
+define('PR_ADDITIONAL_REN_ENTRYIDS_EX', mapi_prop_tag(PT_BINARY, 0x36D9));
762 762
 
763 763
 
764 764
 
@@ -766,160 +766,160 @@  discard block
 block discarded – undo
766 766
  * Don't know where to put these
767 767
  */
768 768
 
769
-define('PR_ICON_INDEX'                                ,mapi_prop_tag(PT_LONG,        0x1080));
770
-define('PR_LAST_VERB_EXECUTED'                        ,mapi_prop_tag(PT_LONG,        0x1081));
771
-define('PR_LAST_VERB_EXECUTION_TIME'                  ,mapi_prop_tag(PT_SYSTIME,     0x1082));
772
-define('PR_INTERNET_CPID'                             ,mapi_prop_tag(PT_LONG,        0x3FDE));
773
-define('PR_RECIPIENT_ENTRYID'                         ,mapi_prop_tag(PT_BINARY,      0x5FF7));
774
-define('PR_SEND_INTERNET_ENCODING'                    ,mapi_prop_tag(PT_LONG,        0x3FDE));
775
-define('PR_RECIPIENT_DISPLAY_NAME'                    ,mapi_prop_tag(PT_STRING8,     0x5FF6));
776
-define('PR_RECIPIENT_TRACKSTATUS'                     ,mapi_prop_tag(PT_LONG,        0x5FFF));
777
-define('PR_RECIPIENT_FLAGS'                           ,mapi_prop_tag(PT_LONG,        0x5FFD));
778
-define('PR_RECIPIENT_TRACKSTATUS_TIME'                ,mapi_prop_tag(PT_SYSTIME,     0x5FFB));
779
-
780
-define('PR_EC_OUTOFOFFICE'                            ,mapi_prop_tag(PT_BOOLEAN,     0x6760));
781
-define('PR_EC_OUTOFOFFICE_MSG'                        ,mapi_prop_tag(PT_STRING8,     0x6761));
782
-define('PR_EC_OUTOFOFFICE_SUBJECT'                    ,mapi_prop_tag(PT_STRING8,     0x6762));
783
-define('PR_EC_OUTOFOFFICE_FROM'                       ,mapi_prop_tag(PT_SYSTIME,     0x6763));
784
-define('PR_EC_OUTOFOFFICE_UNTIL'                      ,mapi_prop_tag(PT_SYSTIME,     0x6764));
769
+define('PR_ICON_INDEX', mapi_prop_tag(PT_LONG, 0x1080));
770
+define('PR_LAST_VERB_EXECUTED', mapi_prop_tag(PT_LONG, 0x1081));
771
+define('PR_LAST_VERB_EXECUTION_TIME', mapi_prop_tag(PT_SYSTIME, 0x1082));
772
+define('PR_INTERNET_CPID', mapi_prop_tag(PT_LONG, 0x3FDE));
773
+define('PR_RECIPIENT_ENTRYID', mapi_prop_tag(PT_BINARY, 0x5FF7));
774
+define('PR_SEND_INTERNET_ENCODING', mapi_prop_tag(PT_LONG, 0x3FDE));
775
+define('PR_RECIPIENT_DISPLAY_NAME', mapi_prop_tag(PT_STRING8, 0x5FF6));
776
+define('PR_RECIPIENT_TRACKSTATUS', mapi_prop_tag(PT_LONG, 0x5FFF));
777
+define('PR_RECIPIENT_FLAGS', mapi_prop_tag(PT_LONG, 0x5FFD));
778
+define('PR_RECIPIENT_TRACKSTATUS_TIME', mapi_prop_tag(PT_SYSTIME, 0x5FFB));
779
+
780
+define('PR_EC_OUTOFOFFICE', mapi_prop_tag(PT_BOOLEAN, 0x6760));
781
+define('PR_EC_OUTOFOFFICE_MSG', mapi_prop_tag(PT_STRING8, 0x6761));
782
+define('PR_EC_OUTOFOFFICE_SUBJECT', mapi_prop_tag(PT_STRING8, 0x6762));
783
+define('PR_EC_OUTOFOFFICE_FROM', mapi_prop_tag(PT_SYSTIME, 0x6763));
784
+define('PR_EC_OUTOFOFFICE_UNTIL', mapi_prop_tag(PT_SYSTIME, 0x6764));
785 785
 
786 786
 /* quota support */
787
-define('PR_QUOTA_WARNING_THRESHOLD'                   ,mapi_prop_tag(PT_LONG,        0x6721));
788
-define('PR_QUOTA_SEND_THRESHOLD'                      ,mapi_prop_tag(PT_LONG,        0x6722));
789
-define('PR_QUOTA_RECEIVE_THRESHOLD'                   ,mapi_prop_tag(PT_LONG,        0x6723));
787
+define('PR_QUOTA_WARNING_THRESHOLD', mapi_prop_tag(PT_LONG, 0x6721));
788
+define('PR_QUOTA_SEND_THRESHOLD', mapi_prop_tag(PT_LONG, 0x6722));
789
+define('PR_QUOTA_RECEIVE_THRESHOLD', mapi_prop_tag(PT_LONG, 0x6723));
790 790
 
791 791
 /* storage for the settings for the webaccess 6.xx */
792
-define('PR_EC_WEBACCESS_SETTINGS'                     ,mapi_prop_tag(PT_STRING8,     0x6770));
793
-define('PR_EC_RECIPIENT_HISTORY'                      ,mapi_prop_tag(PT_STRING8,     0x6771));
792
+define('PR_EC_WEBACCESS_SETTINGS', mapi_prop_tag(PT_STRING8, 0x6770));
793
+define('PR_EC_RECIPIENT_HISTORY', mapi_prop_tag(PT_STRING8, 0x6771));
794 794
 
795 795
 /* storage for the settings for the webaccess 7.xx */
796
-define('PR_EC_WEBACCESS_SETTINGS_JSON'                ,mapi_prop_tag(PT_STRING8,     0x6772));
797
-define('PR_EC_RECIPIENT_HISTORY_JSON'                 ,mapi_prop_tag(PT_STRING8,     0x6773));
796
+define('PR_EC_WEBACCESS_SETTINGS_JSON', mapi_prop_tag(PT_STRING8, 0x6772));
797
+define('PR_EC_RECIPIENT_HISTORY_JSON', mapi_prop_tag(PT_STRING8, 0x6773));
798 798
 
799 799
 /* The persistent settings are settings that will not be touched when the settings are reset */
800
-define('PR_EC_WEBAPP_PERSISTENT_SETTINGS_JSON'        ,mapi_prop_tag(PT_STRING8,     0x6774));
800
+define('PR_EC_WEBAPP_PERSISTENT_SETTINGS_JSON', mapi_prop_tag(PT_STRING8, 0x6774));
801 801
 
802 802
 /* statistics properties */
803
-define('PR_EC_STATSTABLE_SYSTEM'                      ,mapi_prop_tag(PT_OBJECT,      0x6730));
804
-define('PR_EC_STATSTABLE_SESSIONS'                    ,mapi_prop_tag(PT_OBJECT,      0x6731));
805
-define('PR_EC_STATSTABLE_USERS'                       ,mapi_prop_tag(PT_OBJECT,      0x6732));
806
-define('PR_EC_STATSTABLE_COMPANY'                     ,mapi_prop_tag(PT_OBJECT,      0x6733));
807
-
808
-define('PR_EC_STATS_SYSTEM_DESCRIPTION'               ,mapi_prop_tag(PT_STRING8,     0x6740));
809
-define('PR_EC_STATS_SYSTEM_VALUE'                     ,mapi_prop_tag(PT_STRING8,     0x6741));
810
-define('PR_EC_STATS_SESSION_ID'                       ,mapi_prop_tag(PT_LONG,        0x6742));
811
-define('PR_EC_STATS_SESSION_IPADDRESS'                ,mapi_prop_tag(PT_STRING8,     0x6743));
812
-define('PR_EC_STATS_SESSION_IDLETIME'                 ,mapi_prop_tag(PT_LONG,        0x6744));
813
-define('PR_EC_STATS_SESSION_CAPABILITY'               ,mapi_prop_tag(PT_LONG,        0x6745));
814
-define('PR_EC_STATS_SESSION_LOCKED'                   ,mapi_prop_tag(PT_BOOLEAN,     0x6746));
815
-define('PR_EC_STATS_SESSION_BUSYSTATES'               ,mapi_prop_tag(PT_MV_STRING8,  0x6747));
816
-define('PR_EC_COMPANY_NAME'                           ,mapi_prop_tag(PT_STRING8,     0x6748));
803
+define('PR_EC_STATSTABLE_SYSTEM', mapi_prop_tag(PT_OBJECT, 0x6730));
804
+define('PR_EC_STATSTABLE_SESSIONS', mapi_prop_tag(PT_OBJECT, 0x6731));
805
+define('PR_EC_STATSTABLE_USERS', mapi_prop_tag(PT_OBJECT, 0x6732));
806
+define('PR_EC_STATSTABLE_COMPANY', mapi_prop_tag(PT_OBJECT, 0x6733));
807
+
808
+define('PR_EC_STATS_SYSTEM_DESCRIPTION', mapi_prop_tag(PT_STRING8, 0x6740));
809
+define('PR_EC_STATS_SYSTEM_VALUE', mapi_prop_tag(PT_STRING8, 0x6741));
810
+define('PR_EC_STATS_SESSION_ID', mapi_prop_tag(PT_LONG, 0x6742));
811
+define('PR_EC_STATS_SESSION_IPADDRESS', mapi_prop_tag(PT_STRING8, 0x6743));
812
+define('PR_EC_STATS_SESSION_IDLETIME', mapi_prop_tag(PT_LONG, 0x6744));
813
+define('PR_EC_STATS_SESSION_CAPABILITY', mapi_prop_tag(PT_LONG, 0x6745));
814
+define('PR_EC_STATS_SESSION_LOCKED', mapi_prop_tag(PT_BOOLEAN, 0x6746));
815
+define('PR_EC_STATS_SESSION_BUSYSTATES', mapi_prop_tag(PT_MV_STRING8, 0x6747));
816
+define('PR_EC_COMPANY_NAME', mapi_prop_tag(PT_STRING8, 0x6748));
817 817
 
818 818
 /* user features */
819
-define('PR_EC_ENABLED_FEATURES'                       ,mapi_prop_tag(PT_MV_TSTRING,  0x67B3));
820
-define('PR_EC_DISABLED_FEATURES'                      ,mapi_prop_tag(PT_MV_TSTRING,  0x67B4));
819
+define('PR_EC_ENABLED_FEATURES', mapi_prop_tag(PT_MV_TSTRING, 0x67B3));
820
+define('PR_EC_DISABLED_FEATURES', mapi_prop_tag(PT_MV_TSTRING, 0x67B4));
821 821
 
822 822
 /* WA properties */
823
-define('PR_EC_WA_ATTACHMENT_HIDDEN_OVERRIDE'          ,mapi_prop_tag(PT_BOOLEAN,     0x67E0));
824
-define('PR_EC_WA_ATTACHMENT_ID'                       ,mapi_prop_tag(PT_STRING8,     0x67E1));
823
+define('PR_EC_WA_ATTACHMENT_HIDDEN_OVERRIDE', mapi_prop_tag(PT_BOOLEAN, 0x67E0));
824
+define('PR_EC_WA_ATTACHMENT_ID', mapi_prop_tag(PT_STRING8, 0x67E1));
825 825
 
826 826
 // edkmdb, rules properties
827 827
 #define pidSpecialMin                                   0x6670
828
-define('PR_RULE_ID'                                   ,mapi_prop_tag(PT_I8,          0x6674)); // only lower 32bits are used.
829
-define('PR_RULE_IDS'                                  ,mapi_prop_tag(PT_BINARY,      0x6675));
830
-define('PR_RULE_SEQUENCE'                             ,mapi_prop_tag(PT_LONG,        0x6676));
831
-define('PR_RULE_STATE'                                ,mapi_prop_tag(PT_LONG,        0x6677));
832
-define('PR_RULE_USER_FLAGS'                           ,mapi_prop_tag(PT_LONG,        0x6678));
833
-define('PR_RULE_CONDITION'                            ,mapi_prop_tag(PT_SRESTRICTION,0x6679));
834
-define('PR_RULE_ACTIONS'                              ,mapi_prop_tag(PT_ACTIONS,     0x6680));
835
-define('PR_RULE_PROVIDER'                             ,mapi_prop_tag(PT_STRING8,     0x6681));
836
-define('PR_RULE_NAME'                                 ,mapi_prop_tag(PT_TSTRING,     0x6682));
837
-define('PR_RULE_LEVEL'                                ,mapi_prop_tag(PT_LONG,        0x6683));
838
-define('PR_RULE_PROVIDER_DATA'                        ,mapi_prop_tag(PT_BINARY,      0x6684));
828
+define('PR_RULE_ID', mapi_prop_tag(PT_I8, 0x6674)); // only lower 32bits are used.
829
+define('PR_RULE_IDS', mapi_prop_tag(PT_BINARY, 0x6675));
830
+define('PR_RULE_SEQUENCE', mapi_prop_tag(PT_LONG, 0x6676));
831
+define('PR_RULE_STATE', mapi_prop_tag(PT_LONG, 0x6677));
832
+define('PR_RULE_USER_FLAGS', mapi_prop_tag(PT_LONG, 0x6678));
833
+define('PR_RULE_CONDITION', mapi_prop_tag(PT_SRESTRICTION, 0x6679));
834
+define('PR_RULE_ACTIONS', mapi_prop_tag(PT_ACTIONS, 0x6680));
835
+define('PR_RULE_PROVIDER', mapi_prop_tag(PT_STRING8, 0x6681));
836
+define('PR_RULE_NAME', mapi_prop_tag(PT_TSTRING, 0x6682));
837
+define('PR_RULE_LEVEL', mapi_prop_tag(PT_LONG, 0x6683));
838
+define('PR_RULE_PROVIDER_DATA', mapi_prop_tag(PT_BINARY, 0x6684));
839 839
 
840 840
 // edkmdb, ICS properties
841
-define('PR_SOURCE_KEY'                                ,mapi_prop_tag(PT_BINARY,      0x65E0));
842
-define('PR_PARENT_SOURCE_KEY'                         ,mapi_prop_tag(PT_BINARY,      0x65E1));
843
-define('PR_CHANGE_KEY'                                ,mapi_prop_tag(PT_BINARY,      0x65E2));
844
-define('PR_PREDECESSOR_CHANGE_LIST'                   ,mapi_prop_tag(PT_BINARY,      0x65E3));
841
+define('PR_SOURCE_KEY', mapi_prop_tag(PT_BINARY, 0x65E0));
842
+define('PR_PARENT_SOURCE_KEY', mapi_prop_tag(PT_BINARY, 0x65E1));
843
+define('PR_CHANGE_KEY', mapi_prop_tag(PT_BINARY, 0x65E2));
844
+define('PR_PREDECESSOR_CHANGE_LIST', mapi_prop_tag(PT_BINARY, 0x65E3));
845 845
 
846 846
 
847
-define('PR_PROCESS_MEETING_REQUESTS'                  ,mapi_prop_tag(PT_BOOLEAN,     0x686D));
848
-define('PR_DECLINE_RECURRING_MEETING_REQUESTS'        ,mapi_prop_tag(PT_BOOLEAN,     0x686E));
849
-define('PR_DECLINE_CONFLICTING_MEETING_REQUESTS'      ,mapi_prop_tag(PT_BOOLEAN,     0x686F));
847
+define('PR_PROCESS_MEETING_REQUESTS', mapi_prop_tag(PT_BOOLEAN, 0x686D));
848
+define('PR_DECLINE_RECURRING_MEETING_REQUESTS', mapi_prop_tag(PT_BOOLEAN, 0x686E));
849
+define('PR_DECLINE_CONFLICTING_MEETING_REQUESTS', mapi_prop_tag(PT_BOOLEAN, 0x686F));
850 850
 
851 851
 
852
-define('PR_PROPOSEDNEWTIME'                           ,mapi_prop_tag(PT_BOOLEAN,     0x5FE1));
853
-define('PR_PROPOSENEWTIME_START'                      ,mapi_prop_tag(PT_SYSTIME,     0x5FE3));
854
-define('PR_PROPOSENEWTIME_END'                        ,mapi_prop_tag(PT_SYSTIME,     0x5FE4));
852
+define('PR_PROPOSEDNEWTIME', mapi_prop_tag(PT_BOOLEAN, 0x5FE1));
853
+define('PR_PROPOSENEWTIME_START', mapi_prop_tag(PT_SYSTIME, 0x5FE3));
854
+define('PR_PROPOSENEWTIME_END', mapi_prop_tag(PT_SYSTIME, 0x5FE4));
855 855
 
856 856
 // property for sort the recoverable items.
857
-define('PR_DELETED_ON'                                ,mapi_prop_tag(PT_SYSTIME,     0x668F));
857
+define('PR_DELETED_ON', mapi_prop_tag(PT_SYSTIME, 0x668F));
858 858
 
859
-define('PR_PROCESSED'                                 ,mapi_prop_tag(PT_BOOLEAN,     0x7D01));
859
+define('PR_PROCESSED', mapi_prop_tag(PT_BOOLEAN, 0x7D01));
860 860
 
861 861
 // Delegates properties
862
-define('PR_DELEGATES_SEE_PRIVATE'                     ,mapi_prop_tag(PT_MV_LONG,     0x686B));
863
-define('PR_SCHDINFO_DELEGATE_ENTRYIDS'                ,mapi_prop_tag(PT_MV_BINARY,   0x6845));
864
-define('PR_SCHDINFO_DELEGATE_NAMES'                   ,mapi_prop_tag(PT_MV_STRING8,  0x6844));
865
-define('PR_DELEGATED_BY_RULE'                         ,mapi_prop_tag(PT_BOOLEAN,     0x3FE3));
862
+define('PR_DELEGATES_SEE_PRIVATE', mapi_prop_tag(PT_MV_LONG, 0x686B));
863
+define('PR_SCHDINFO_DELEGATE_ENTRYIDS', mapi_prop_tag(PT_MV_BINARY, 0x6845));
864
+define('PR_SCHDINFO_DELEGATE_NAMES', mapi_prop_tag(PT_MV_STRING8, 0x6844));
865
+define('PR_DELEGATED_BY_RULE', mapi_prop_tag(PT_BOOLEAN, 0x3FE3));
866 866
 
867 867
 // properties required in Reply mail.
868
-define('PR_INTERNET_REFERENCES'                       ,mapi_prop_tag(PT_STRING8,     0x1039));
869
-define('PR_IN_REPLY_TO_ID'                            ,mapi_prop_tag(PT_STRING8,     0x1042));
870
-define('PR_INTERNET_MESSAGE_ID'                       ,mapi_prop_tag(PT_STRING8,     0x1035));
868
+define('PR_INTERNET_REFERENCES', mapi_prop_tag(PT_STRING8, 0x1039));
869
+define('PR_IN_REPLY_TO_ID', mapi_prop_tag(PT_STRING8, 0x1042));
870
+define('PR_INTERNET_MESSAGE_ID', mapi_prop_tag(PT_STRING8, 0x1035));
871 871
 
872 872
 // for hidden folders
873
-define('PR_ATTR_HIDDEN'                               ,mapi_prop_tag(PT_BOOLEAN,     0x10F4));
873
+define('PR_ATTR_HIDDEN', mapi_prop_tag(PT_BOOLEAN, 0x10F4));
874 874
 
875 875
 /**
876 876
  * Addressbook detail properties.
877 877
  * It is not defined by MAPI, but to keep in sync with the interface of outlook we have to use these
878 878
  * properties. Outlook actually uses these properties for it's addressbook details.
879 879
  */
880
-define('PR_HOME2_TELEPHONE_NUMBER_MV'                 ,mapi_prop_tag(PT_MV_TSTRING,  0x3A2F));
881
-define('PR_BUSINESS2_TELEPHONE_NUMBER_MV'             ,mapi_prop_tag(PT_MV_TSTRING,  0x3A1B));
882
-define('PR_EMS_AB_PROXY_ADDRESSES'                    ,mapi_prop_tag(PT_TSTRING,     0x800F));
883
-define('PR_EMS_AB_PROXY_ADDRESSES_MV'                 ,mapi_prop_tag(PT_MV_TSTRING,  0x800F));
884
-define('PR_EMS_AB_MANAGER'                            ,mapi_prop_tag(PT_BINARY,      0x8005));
885
-define('PR_EMS_AB_REPORTS'                            ,mapi_prop_tag(PT_BINARY,      0x800E));
886
-define('PR_EMS_AB_REPORTS_MV'                         ,mapi_prop_tag(PT_MV_BINARY,   0x800E));
887
-define('PR_EMS_AB_IS_MEMBER_OF_DL'                    ,mapi_prop_tag(PT_MV_BINARY,   0x8008));
888
-define('PR_EMS_AB_OWNER'                              ,mapi_prop_tag(PT_BINARY,      0x800C));
889
-define('PR_EMS_AB_ROOM_CAPACITY'                      ,mapi_prop_tag(PT_LONG,        0x0807));
890
-define('PR_EMS_AB_TAGGED_X509_CERT'                   ,mapi_prop_tag(PT_MV_BINARY,   0x8C6A));
891
-define('PR_EMS_AB_THUMBNAIL_PHOTO'                    ,mapi_prop_tag(PT_BINARY,      0x8C9E));
892
-
893
-define('PR_EC_ARCHIVE_SERVERS'                        ,mapi_prop_tag(PT_MV_TSTRING,  0x67c4));
880
+define('PR_HOME2_TELEPHONE_NUMBER_MV', mapi_prop_tag(PT_MV_TSTRING, 0x3A2F));
881
+define('PR_BUSINESS2_TELEPHONE_NUMBER_MV', mapi_prop_tag(PT_MV_TSTRING, 0x3A1B));
882
+define('PR_EMS_AB_PROXY_ADDRESSES', mapi_prop_tag(PT_TSTRING, 0x800F));
883
+define('PR_EMS_AB_PROXY_ADDRESSES_MV', mapi_prop_tag(PT_MV_TSTRING, 0x800F));
884
+define('PR_EMS_AB_MANAGER', mapi_prop_tag(PT_BINARY, 0x8005));
885
+define('PR_EMS_AB_REPORTS', mapi_prop_tag(PT_BINARY, 0x800E));
886
+define('PR_EMS_AB_REPORTS_MV', mapi_prop_tag(PT_MV_BINARY, 0x800E));
887
+define('PR_EMS_AB_IS_MEMBER_OF_DL', mapi_prop_tag(PT_MV_BINARY, 0x8008));
888
+define('PR_EMS_AB_OWNER', mapi_prop_tag(PT_BINARY, 0x800C));
889
+define('PR_EMS_AB_ROOM_CAPACITY', mapi_prop_tag(PT_LONG, 0x0807));
890
+define('PR_EMS_AB_TAGGED_X509_CERT', mapi_prop_tag(PT_MV_BINARY, 0x8C6A));
891
+define('PR_EMS_AB_THUMBNAIL_PHOTO', mapi_prop_tag(PT_BINARY, 0x8C9E));
892
+
893
+define('PR_EC_ARCHIVE_SERVERS', mapi_prop_tag(PT_MV_TSTRING, 0x67c4));
894 894
 
895 895
 /* grommunio contacts provider properties */
896
-define('PR_ZC_CONTACT_STORE_ENTRYIDS'                 ,mapi_prop_tag(PT_MV_BINARY,   0x6711));
897
-define('PR_ZC_CONTACT_FOLDER_ENTRYIDS'                ,mapi_prop_tag(PT_MV_BINARY,   0x6712));
898
-define('PR_ZC_CONTACT_FOLDER_NAMES'                   ,mapi_prop_tag(PT_MV_TSTRING,  0x6713));
896
+define('PR_ZC_CONTACT_STORE_ENTRYIDS', mapi_prop_tag(PT_MV_BINARY, 0x6711));
897
+define('PR_ZC_CONTACT_FOLDER_ENTRYIDS', mapi_prop_tag(PT_MV_BINARY, 0x6712));
898
+define('PR_ZC_CONTACT_FOLDER_NAMES', mapi_prop_tag(PT_MV_TSTRING, 0x6713));
899 899
 
900 900
 /* grommunio specific properties for optimization of imap functionality */
901
-define('PR_EC_IMAP_EMAIL'                             ,mapi_prop_tag(PT_BINARY,      0x678C)); //the complete rfc822 email
902
-define('PR_EC_IMAP_EMAIL_SIZE'                        ,mapi_prop_tag(PT_LONG,        0x678D));
903
-define('PR_EC_IMAP_BODY'                              ,mapi_prop_tag(PT_STRING8,     0x678E)); //simplified bodystructure (mostly unused by clients)
904
-define('PR_EC_IMAP_BODYSTRUCTURE'                     ,mapi_prop_tag(PT_STRING8,     0x678F)); //extended bodystructure (often used by clients)
901
+define('PR_EC_IMAP_EMAIL', mapi_prop_tag(PT_BINARY, 0x678C)); //the complete rfc822 email
902
+define('PR_EC_IMAP_EMAIL_SIZE', mapi_prop_tag(PT_LONG, 0x678D));
903
+define('PR_EC_IMAP_BODY', mapi_prop_tag(PT_STRING8, 0x678E)); //simplified bodystructure (mostly unused by clients)
904
+define('PR_EC_IMAP_BODYSTRUCTURE', mapi_prop_tag(PT_STRING8, 0x678F)); //extended bodystructure (often used by clients)
905 905
 
906 906
 /* Folder properties for unread counters */
907
-define('PR_LOCAL_COMMIT_TIME_MAX'                     ,mapi_prop_tag(PT_SYSTIME,     0x670A));
908
-define('PR_DELETED_MSG_COUNT'                         ,mapi_prop_tag(PT_LONG,        0x6640));
907
+define('PR_LOCAL_COMMIT_TIME_MAX', mapi_prop_tag(PT_SYSTIME, 0x670A));
908
+define('PR_DELETED_MSG_COUNT', mapi_prop_tag(PT_LONG, 0x6640));
909 909
 
910 910
 /* Favorites folder properties*/
911
-define('PR_WLINK_ENTRYID'                             ,mapi_prop_tag(PT_BINARY,      0x684C));
912
-define('PR_WLINK_FLAGS'                               ,mapi_prop_tag(PT_LONG,        0x684A));
913
-define('PR_WLINK_ORDINAL'                             ,mapi_prop_tag(PT_BINARY,      0x684B));
914
-define('PR_WLINK_STORE_ENTRYID'                       ,mapi_prop_tag(PT_BINARY,      0x684E));
915
-define('PR_WLINK_TYPE'                                ,mapi_prop_tag(PT_LONG,        0x6849));
916
-define('PR_WLINK_SECTION'                             ,mapi_prop_tag(PT_LONG,        0x6852));
917
-define('PR_WLINK_RECKEY'                              ,mapi_prop_tag(PT_BINARY,      0x684D));
918
-define('PR_WB_SF_ID'                                  ,mapi_prop_tag(PT_BINARY,      0x6842));
911
+define('PR_WLINK_ENTRYID', mapi_prop_tag(PT_BINARY, 0x684C));
912
+define('PR_WLINK_FLAGS', mapi_prop_tag(PT_LONG, 0x684A));
913
+define('PR_WLINK_ORDINAL', mapi_prop_tag(PT_BINARY, 0x684B));
914
+define('PR_WLINK_STORE_ENTRYID', mapi_prop_tag(PT_BINARY, 0x684E));
915
+define('PR_WLINK_TYPE', mapi_prop_tag(PT_LONG, 0x6849));
916
+define('PR_WLINK_SECTION', mapi_prop_tag(PT_LONG, 0x6852));
917
+define('PR_WLINK_RECKEY', mapi_prop_tag(PT_BINARY, 0x684D));
918
+define('PR_WB_SF_ID', mapi_prop_tag(PT_BINARY, 0x6842));
919 919
 
920 920
 /* Search folder properties */
921
-define('PR_EC_SUGGESTION'                             ,mapi_prop_tag(PT_TSTRING,     0x6707));
921
+define('PR_EC_SUGGESTION', mapi_prop_tag(PT_TSTRING, 0x6707));
922 922
 
923
-define('PR_EC_BODY_FILTERED'                          ,mapi_prop_tag(PT_BINARY, 0x6791));
924
-define('PR_PROPOSEDNEWTIME_START'                     ,PR_PROPOSENEWTIME_START);
925
-define('PR_PROPOSEDNEWTIME_END'                       ,PR_PROPOSENEWTIME_END);
923
+define('PR_EC_BODY_FILTERED', mapi_prop_tag(PT_BINARY, 0x6791));
924
+define('PR_PROPOSEDNEWTIME_START', PR_PROPOSENEWTIME_START);
925
+define('PR_PROPOSEDNEWTIME_END', PR_PROPOSENEWTIME_END);
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,8 +5,9 @@
 block discarded – undo
5 5
  * SPDX-FileCopyrightText: Copyright 2020-2022 grommunio GmbH
6 6
  */
7 7
 
8
-if (!function_exists("mapi_prop_tag"))
8
+if (!function_exists("mapi_prop_tag")) {
9 9
     throw new FatalMisconfigurationException("PHP-MAPI extension is not available");
10
+}
10 11
 
11 12
 define('PR_ACKNOWLEDGEMENT_MODE'                      ,mapi_prop_tag(PT_LONG,        0x0001));
12 13
 define('PR_ALTERNATE_RECIPIENT_ALLOWED'               ,mapi_prop_tag(PT_BOOLEAN,     0x0002));
Please login to merge, or discard this patch.
mapi/class.freebusypublish.php 3 patches
Indentation   +115 added lines, -115 removed lines patch added patch discarded remove patch
@@ -83,116 +83,116 @@  discard block
 block discarded – undo
83 83
         $calendaritems = Array();
84 84
 
85 85
         $restrict = Array(RES_OR,
86
-                             Array(
87
-                                   // OR
88
-                                   // (item[start] >= start && item[start] <= end)
89
-                                   Array(RES_AND,
90
-                                         Array(
91
-                                               Array(RES_PROPERTY,
92
-                                                     Array(RELOP => RELOP_GE,
93
-                                                           ULPROPTAG => $this->proptags["startdate"],
94
-                                                           VALUE => $start
95
-                                                           )
96
-                                                     ),
97
-                                               Array(RES_PROPERTY,
98
-                                                     Array(RELOP => RELOP_LE,
99
-                                                           ULPROPTAG => $this->proptags["startdate"],
100
-                                                           VALUE => $end
101
-                                                           )
102
-                                                     )
103
-                                               )
104
-                                         ),
105
-                                   // OR
106
-                                   // (item[end]   >= start && item[end]   <= end)
107
-                                   Array(RES_AND,
108
-                                         Array(
109
-                                               Array(RES_PROPERTY,
110
-                                                     Array(RELOP => RELOP_GE,
111
-                                                           ULPROPTAG => $this->proptags["duedate"],
112
-                                                           VALUE => $start
113
-                                                           )
114
-                                                     ),
115
-                                               Array(RES_PROPERTY,
116
-                                                     Array(RELOP => RELOP_LE,
117
-                                                           ULPROPTAG => $this->proptags["duedate"],
118
-                                                           VALUE => $end
119
-                                                           )
120
-                                                     )
121
-                                               )
122
-                                         ),
123
-                                   // OR
124
-                                   // (item[start] <  start && item[end]   >  end)
125
-                                   Array(RES_AND,
126
-                                         Array(
127
-                                               Array(RES_PROPERTY,
128
-                                                     Array(RELOP => RELOP_LT,
129
-                                                           ULPROPTAG => $this->proptags["startdate"],
130
-                                                           VALUE => $start
131
-                                                           )
132
-                                                     ),
133
-                                               Array(RES_PROPERTY,
134
-                                                     Array(RELOP => RELOP_GT,
135
-                                                           ULPROPTAG => $this->proptags["duedate"],
136
-                                                           VALUE => $end
137
-                                                           )
138
-                                                     )
139
-                                               )
140
-                                         ),
141
-                                   // OR
142
-                                   Array(RES_OR,
143
-                                         Array(
144
-                                               // OR
145
-                                               // (EXIST(ecurrence_enddate_property) && item[isRecurring] == true && item[end] >= start)
146
-                                               Array(RES_AND,
147
-                                                     Array(
148
-                                                           Array(RES_EXIST,
149
-                                                                 Array(ULPROPTAG => $this->proptags["enddate_recurring"],
150
-                                                                       )
151
-                                                                 ),
152
-                                                           Array(RES_PROPERTY,
153
-                                                                 Array(RELOP => RELOP_EQ,
154
-                                                                       ULPROPTAG => $this->proptags["recurring"],
155
-                                                                       VALUE => true
156
-                                                                       )
157
-                                                                 ),
158
-                                                           Array(RES_PROPERTY,
159
-                                                                 Array(RELOP => RELOP_GE,
160
-                                                                       ULPROPTAG => $this->proptags["enddate_recurring"],
161
-                                                                       VALUE => $start
162
-                                                                       )
163
-                                                                 )
164
-                                                           )
165
-                                                     ),
166
-                                               // OR
167
-                                               // (!EXIST(ecurrence_enddate_property) && item[isRecurring] == true && item[start] <= end)
168
-                                               Array(RES_AND,
169
-                                                     Array(
170
-                                                           Array(RES_NOT,
171
-                                                                 Array(
172
-                                                                       Array(RES_EXIST,
173
-                                                                             Array(ULPROPTAG => $this->proptags["enddate_recurring"]
174
-                                                                                   )
175
-                                                                             )
176
-                                                                       )
177
-                                                                 ),
178
-                                                           Array(RES_PROPERTY,
179
-                                                                 Array(RELOP => RELOP_LE,
180
-                                                                       ULPROPTAG => $this->proptags["startdate"],
181
-                                                                       VALUE => $end
182
-                                                                       )
183
-                                                                 ),
184
-                                                           Array(RES_PROPERTY,
185
-                                                                 Array(RELOP => RELOP_EQ,
186
-                                                                       ULPROPTAG => $this->proptags["recurring"],
187
-                                                                       VALUE => true
188
-                                                                       )
189
-                                                                 )
190
-                                                           )
191
-                                                     )
192
-                                               )
193
-                                         ) // EXISTS OR
194
-                                   )
195
-                             );        // global OR
86
+                                Array(
87
+                                    // OR
88
+                                    // (item[start] >= start && item[start] <= end)
89
+                                    Array(RES_AND,
90
+                                            Array(
91
+                                                Array(RES_PROPERTY,
92
+                                                        Array(RELOP => RELOP_GE,
93
+                                                            ULPROPTAG => $this->proptags["startdate"],
94
+                                                            VALUE => $start
95
+                                                            )
96
+                                                        ),
97
+                                                Array(RES_PROPERTY,
98
+                                                        Array(RELOP => RELOP_LE,
99
+                                                            ULPROPTAG => $this->proptags["startdate"],
100
+                                                            VALUE => $end
101
+                                                            )
102
+                                                        )
103
+                                                )
104
+                                            ),
105
+                                    // OR
106
+                                    // (item[end]   >= start && item[end]   <= end)
107
+                                    Array(RES_AND,
108
+                                            Array(
109
+                                                Array(RES_PROPERTY,
110
+                                                        Array(RELOP => RELOP_GE,
111
+                                                            ULPROPTAG => $this->proptags["duedate"],
112
+                                                            VALUE => $start
113
+                                                            )
114
+                                                        ),
115
+                                                Array(RES_PROPERTY,
116
+                                                        Array(RELOP => RELOP_LE,
117
+                                                            ULPROPTAG => $this->proptags["duedate"],
118
+                                                            VALUE => $end
119
+                                                            )
120
+                                                        )
121
+                                                )
122
+                                            ),
123
+                                    // OR
124
+                                    // (item[start] <  start && item[end]   >  end)
125
+                                    Array(RES_AND,
126
+                                            Array(
127
+                                                Array(RES_PROPERTY,
128
+                                                        Array(RELOP => RELOP_LT,
129
+                                                            ULPROPTAG => $this->proptags["startdate"],
130
+                                                            VALUE => $start
131
+                                                            )
132
+                                                        ),
133
+                                                Array(RES_PROPERTY,
134
+                                                        Array(RELOP => RELOP_GT,
135
+                                                            ULPROPTAG => $this->proptags["duedate"],
136
+                                                            VALUE => $end
137
+                                                            )
138
+                                                        )
139
+                                                )
140
+                                            ),
141
+                                    // OR
142
+                                    Array(RES_OR,
143
+                                            Array(
144
+                                                // OR
145
+                                                // (EXIST(ecurrence_enddate_property) && item[isRecurring] == true && item[end] >= start)
146
+                                                Array(RES_AND,
147
+                                                        Array(
148
+                                                            Array(RES_EXIST,
149
+                                                                    Array(ULPROPTAG => $this->proptags["enddate_recurring"],
150
+                                                                        )
151
+                                                                    ),
152
+                                                            Array(RES_PROPERTY,
153
+                                                                    Array(RELOP => RELOP_EQ,
154
+                                                                        ULPROPTAG => $this->proptags["recurring"],
155
+                                                                        VALUE => true
156
+                                                                        )
157
+                                                                    ),
158
+                                                            Array(RES_PROPERTY,
159
+                                                                    Array(RELOP => RELOP_GE,
160
+                                                                        ULPROPTAG => $this->proptags["enddate_recurring"],
161
+                                                                        VALUE => $start
162
+                                                                        )
163
+                                                                    )
164
+                                                            )
165
+                                                        ),
166
+                                                // OR
167
+                                                // (!EXIST(ecurrence_enddate_property) && item[isRecurring] == true && item[start] <= end)
168
+                                                Array(RES_AND,
169
+                                                        Array(
170
+                                                            Array(RES_NOT,
171
+                                                                    Array(
172
+                                                                        Array(RES_EXIST,
173
+                                                                                Array(ULPROPTAG => $this->proptags["enddate_recurring"]
174
+                                                                                    )
175
+                                                                                )
176
+                                                                        )
177
+                                                                    ),
178
+                                                            Array(RES_PROPERTY,
179
+                                                                    Array(RELOP => RELOP_LE,
180
+                                                                        ULPROPTAG => $this->proptags["startdate"],
181
+                                                                        VALUE => $end
182
+                                                                        )
183
+                                                                    ),
184
+                                                            Array(RES_PROPERTY,
185
+                                                                    Array(RELOP => RELOP_EQ,
186
+                                                                        ULPROPTAG => $this->proptags["recurring"],
187
+                                                                        VALUE => true
188
+                                                                        )
189
+                                                                    )
190
+                                                            )
191
+                                                        )
192
+                                                )
193
+                                            ) // EXISTS OR
194
+                                    )
195
+                                );        // global OR
196 196
 
197 197
         $contents = mapi_folder_getcontentstable($this->calendar);
198 198
         mapi_table_restrict($contents, $restrict);
@@ -266,8 +266,8 @@  discard block
 block discarded – undo
266 266
     }
267 267
 
268 268
     /**
269
-    * Sorts by timestamp, if equal, then end before start
270
-    */
269
+     * Sorts by timestamp, if equal, then end before start
270
+     */
271 271
     function cmp($a, $b)
272 272
     {
273 273
         if ($a["time"] == $b["time"]) {
@@ -281,9 +281,9 @@  discard block
 block discarded – undo
281 281
     }
282 282
 
283 283
     /**
284
-    * Function mergeItems
285
-    * @author Steve Hardy
286
-    */
284
+     * Function mergeItems
285
+     * @author Steve Hardy
286
+     */
287 287
     function mergeItemsFB($items)
288 288
     {
289 289
         $merged = Array();
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -192,23 +192,23 @@  discard block
 block discarded – undo
192 192
                                                )
193 193
                                          ) // EXISTS OR
194 194
                                    )
195
-                             );        // global OR
195
+                             ); // global OR
196 196
 
197 197
         $contents = mapi_folder_getcontentstable($this->calendar);
198 198
         mapi_table_restrict($contents, $restrict);
199 199
 
200
-        while(1) {
200
+        while (1) {
201 201
             $rows = mapi_table_queryrows($contents, array_values($this->proptags), 0, 50);
202 202
 
203
-            if(!is_array($rows))
203
+            if (!is_array($rows))
204 204
                 break;
205 205
 
206
-            if(empty($rows))
206
+            if (empty($rows))
207 207
                 break;
208 208
 
209 209
             foreach ($rows as $row) {
210 210
                 $occurrences = Array();
211
-                if(isset($row[$this->proptags['recurring']]) && $row[$this->proptags['recurring']]) {
211
+                if (isset($row[$this->proptags['recurring']]) && $row[$this->proptags['recurring']]) {
212 212
                     $recur = new Recurrence($this->store, $row);
213 213
 
214 214
                     $occurrences = $recur->getItems($starttime, $length);
@@ -241,14 +241,14 @@  discard block
 block discarded – undo
241 241
         try {
242 242
             $fbsupport = mapi_freebusysupport_open($this->session, $this->store);
243 243
         } catch (MAPIException $e) {
244
-            if($e->getCode() == MAPI_E_NOT_FOUND) {
244
+            if ($e->getCode() == MAPI_E_NOT_FOUND) {
245 245
                 $e->setHandled();
246 246
                 ZLog::Write(LOGLEVEL_WARN, "Error in opening freebusysupport object.");
247 247
             }
248 248
         }
249 249
 
250 250
         // Open updater for this user
251
-        if(isset($fbsupport) && $fbsupport) {
251
+        if (isset($fbsupport) && $fbsupport) {
252 252
             $updaters = mapi_freebusysupport_loadupdate($fbsupport, Array($this->entryid));
253 253
 
254 254
             $updater = $updaters[0];
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
             // Send the data
257 257
             mapi_freebusyupdate_reset($updater);
258 258
             mapi_freebusyupdate_publish($updater, $freebusy);
259
-            mapi_freebusyupdate_savechanges($updater, $start-24*60*60, $end);
259
+            mapi_freebusyupdate_savechanges($updater, $start - 24 * 60 * 60, $end);
260 260
 
261 261
             // We're finished
262 262
             mapi_freebusysupport_close($fbsupport);
@@ -271,9 +271,9 @@  discard block
 block discarded – undo
271 271
     function cmp($a, $b)
272 272
     {
273 273
         if ($a["time"] == $b["time"]) {
274
-            if($a["type"] < $b["type"])
274
+            if ($a["type"] < $b["type"])
275 275
                 return 1;
276
-            if($a["type"] > $b["type"])
276
+            if ($a["type"] > $b["type"])
277 277
                 return -1;
278 278
             return 0;
279 279
         }
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
         $level = 0;
294 294
         $laststart = null;
295 295
 
296
-        foreach($items as $item)
296
+        foreach ($items as $item)
297 297
         {
298 298
             $ts["type"] = 0;
299 299
             $ts["time"] = $item[$this->proptags["startdate"]];
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
         usort($timestamps, Array($this, "cmp"));
312 312
         $laststart = 0; // seb added
313 313
 
314
-        foreach($timestamps as $ts)
314
+        foreach ($timestamps as $ts)
315 315
         {
316 316
             switch ($ts["type"])
317 317
             {
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
                         $newitem["end"] = $ts["time"];
323 323
                         $newitem["subject"] = join(",", $csubj);
324 324
                         $newitem["status"] = !empty($cbusy) ? max($cbusy) : 0;
325
-                        if($newitem["status"] > 0)
325
+                        if ($newitem["status"] > 0)
326 326
                             $merged[] = $newitem;
327 327
                     }
328 328
 
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
                         $newitem["end"] = $ts["time"];
341 341
                         $newitem["subject"] = join(",", $csubj);
342 342
                         $newitem["status"] = !empty($cbusy) ? max($cbusy) : 0;
343
-                        if($newitem["status"] > 0)
343
+                        if ($newitem["status"] > 0)
344 344
                             $merged[] = $newitem;
345 345
                     }
346 346
 
Please login to merge, or discard this patch.
Braces   +20 added lines, -14 removed lines patch added patch discarded remove patch
@@ -200,11 +200,13 @@  discard block
 block discarded – undo
200 200
         while(1) {
201 201
             $rows = mapi_table_queryrows($contents, array_values($this->proptags), 0, 50);
202 202
 
203
-            if(!is_array($rows))
204
-                break;
203
+            if(!is_array($rows)) {
204
+                            break;
205
+            }
205 206
 
206
-            if(empty($rows))
207
-                break;
207
+            if(empty($rows)) {
208
+                            break;
209
+            }
208 210
 
209 211
             foreach ($rows as $row) {
210 212
                 $occurrences = Array();
@@ -260,9 +262,9 @@  discard block
 block discarded – undo
260 262
 
261 263
             // We're finished
262 264
             mapi_freebusysupport_close($fbsupport);
265
+        } else {
266
+                    ZLog::Write(LOGLEVEL_WARN, "FreeBusyPublish is not available");
263 267
         }
264
-        else
265
-            ZLog::Write(LOGLEVEL_WARN, "FreeBusyPublish is not available");
266 268
     }
267 269
 
268 270
     /**
@@ -271,10 +273,12 @@  discard block
 block discarded – undo
271 273
     function cmp($a, $b)
272 274
     {
273 275
         if ($a["time"] == $b["time"]) {
274
-            if($a["type"] < $b["type"])
275
-                return 1;
276
-            if($a["type"] > $b["type"])
277
-                return -1;
276
+            if($a["type"] < $b["type"]) {
277
+                            return 1;
278
+            }
279
+            if($a["type"] > $b["type"]) {
280
+                            return -1;
281
+            }
278 282
             return 0;
279 283
         }
280 284
         return ($a["time"] > $b["time"] ? 1 : -1);
@@ -322,8 +326,9 @@  discard block
 block discarded – undo
322 326
                         $newitem["end"] = $ts["time"];
323 327
                         $newitem["subject"] = join(",", $csubj);
324 328
                         $newitem["status"] = !empty($cbusy) ? max($cbusy) : 0;
325
-                        if($newitem["status"] > 0)
326
-                            $merged[] = $newitem;
329
+                        if($newitem["status"] > 0) {
330
+                                                    $merged[] = $newitem;
331
+                        }
327 332
                     }
328 333
 
329 334
                     $level++;
@@ -340,8 +345,9 @@  discard block
 block discarded – undo
340 345
                         $newitem["end"] = $ts["time"];
341 346
                         $newitem["subject"] = join(",", $csubj);
342 347
                         $newitem["status"] = !empty($cbusy) ? max($cbusy) : 0;
343
-                        if($newitem["status"] > 0)
344
-                            $merged[] = $newitem;
348
+                        if($newitem["status"] > 0) {
349
+                                                    $merged[] = $newitem;
350
+                        }
345 351
                     }
346 352
 
347 353
                     $level--;
Please login to merge, or discard this patch.
mapi/mapidefs.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -643,7 +643,7 @@
 block discarded – undo
643 643
 /* PersistElementType Values ElementIDs for persist data of PR_IPM_OL2007_ENTRYIDS / PR_ADDITIONAL_REN_ENTRYIDS_EX */
644 644
 define('ELEMENT_SENTINEL'                        ,0x0000); // 0 bytes Indicates that the PersistElement structure is the last one contained in the DataElements field of the PersistData structure.
645 645
 define('RSF_ELID_ENTRYID'                        ,0x0001); // variable Indicates that the ElementData field contains the entry ID of the special folder
646
-                                                           // that is of the type indicated by the value of the PersistID field of the PersistData structure.
646
+                                                            // that is of the type indicated by the value of the PersistID field of the PersistData structure.
647 647
 define('RSF_ELID_HEADER'                         ,0x0002); // 4 bytes Indicates that the ElementData field contains a 4-byte header value equal to 0x00000000.
648 648
 
649 649
 define('STGM_DIRECT'                             ,0x00000000);
Please login to merge, or discard this patch.
Spacing   +449 added lines, -449 removed lines patch added patch discarded remove patch
@@ -6,110 +6,110 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 /* Resource types as defined in main.h of the mapi extension */
9
-define('RESOURCE_SESSION'                        ,'MAPI Session');
10
-define('RESOURCE_TABLE'                          ,'MAPI Table');
11
-define('RESOURCE_ROWSET'                         ,'MAPI Rowset');
12
-define('RESOURCE_MSGSTORE'                       ,'MAPI Message Store');
13
-define('RESOURCE_FOLDER'                         ,'MAPI Folder');
14
-define('RESOURCE_MESSAGE'                        ,'MAPI Message');
15
-define('RESOURCE_ATTACHMENT'                     ,'MAPI Attachment');
9
+define('RESOURCE_SESSION', 'MAPI Session');
10
+define('RESOURCE_TABLE', 'MAPI Table');
11
+define('RESOURCE_ROWSET', 'MAPI Rowset');
12
+define('RESOURCE_MSGSTORE', 'MAPI Message Store');
13
+define('RESOURCE_FOLDER', 'MAPI Folder');
14
+define('RESOURCE_MESSAGE', 'MAPI Message');
15
+define('RESOURCE_ATTACHMENT', 'MAPI Attachment');
16 16
 
17 17
 
18 18
 /* Object type */
19 19
 
20
-define('MAPI_STORE'                              ,0x00000001);    /* Message Store */
21
-define('MAPI_ADDRBOOK'                           ,0x00000002);    /* Address Book */
22
-define('MAPI_FOLDER'                             ,0x00000003);    /* Folder */
23
-define('MAPI_ABCONT'                             ,0x00000004);    /* Address Book Container */
24
-define('MAPI_MESSAGE'                            ,0x00000005);    /* Message */
25
-define('MAPI_MAILUSER'                           ,0x00000006);    /* Individual Recipient */
26
-define('MAPI_ATTACH'                             ,0x00000007);    /* Attachment */
27
-define('MAPI_DISTLIST'                           ,0x00000008);    /* Distribution List Recipient */
28
-define('MAPI_PROFSECT'                           ,0x00000009);    /* Profile Section */
29
-define('MAPI_STATUS'                             ,0x0000000A);    /* Status Object */
30
-define('MAPI_SESSION'                            ,0x0000000B);    /* Session */
31
-define('MAPI_FORMINFO'                           ,0x0000000C);    /* Form Information */
32
-
33
-define('MV_FLAG'                                 ,0x1000);
34
-define('MV_INSTANCE'                             ,0x2000);
35
-define('MVI_FLAG'                                ,MV_FLAG | MV_INSTANCE);
36
-
37
-define('PT_UNSPECIFIED'                          ,  0);    /* (Reserved for interface use) type doesn't matter to caller */
38
-define('PT_NULL'                                 ,  1);    /* NULL property value */
39
-define('PT_I2'                                   ,  2);    /* Signed 16-bit value */
40
-define('PT_LONG'                                 ,  3);    /* Signed 32-bit value */
41
-define('PT_R4'                                   ,  4);    /* 4-byte floating point */
42
-define('PT_DOUBLE'                               ,  5);    /* Floating point double */
43
-define('PT_CURRENCY'                             ,  6);    /* Signed 64-bit int (decimal w/    4 digits right of decimal pt) */
44
-define('PT_APPTIME'                              ,  7);    /* Application time */
45
-define('PT_ERROR'                                , 10);    /* 32-bit error value */
46
-define('PT_BOOLEAN'                              , 11);    /* 16-bit boolean (non-zero true) */
47
-define('PT_OBJECT'                               , 13);    /* Embedded object in a property */
48
-define('PT_I8'                                   , 20);    /* 8-byte signed integer */
49
-define('PT_STRING8'                              , 30);    /* Null terminated 8-bit character string */
50
-define('PT_UNICODE'                              , 31);    /* Null terminated Unicode string */
51
-define('PT_SYSTIME'                              , 64);    /* FILETIME 64-bit int w/ number of 100ns periods since Jan 1,1601 */
52
-define('PT_CLSID'                                , 72);    /* OLE GUID */
53
-define('PT_BINARY'                               ,258);   /* Uninterpreted (counted byte array) */
20
+define('MAPI_STORE', 0x00000001); /* Message Store */
21
+define('MAPI_ADDRBOOK', 0x00000002); /* Address Book */
22
+define('MAPI_FOLDER', 0x00000003); /* Folder */
23
+define('MAPI_ABCONT', 0x00000004); /* Address Book Container */
24
+define('MAPI_MESSAGE', 0x00000005); /* Message */
25
+define('MAPI_MAILUSER', 0x00000006); /* Individual Recipient */
26
+define('MAPI_ATTACH', 0x00000007); /* Attachment */
27
+define('MAPI_DISTLIST', 0x00000008); /* Distribution List Recipient */
28
+define('MAPI_PROFSECT', 0x00000009); /* Profile Section */
29
+define('MAPI_STATUS', 0x0000000A); /* Status Object */
30
+define('MAPI_SESSION', 0x0000000B); /* Session */
31
+define('MAPI_FORMINFO', 0x0000000C); /* Form Information */
32
+
33
+define('MV_FLAG', 0x1000);
34
+define('MV_INSTANCE', 0x2000);
35
+define('MVI_FLAG', MV_FLAG|MV_INSTANCE);
36
+
37
+define('PT_UNSPECIFIED', 0); /* (Reserved for interface use) type doesn't matter to caller */
38
+define('PT_NULL', 1); /* NULL property value */
39
+define('PT_I2', 2); /* Signed 16-bit value */
40
+define('PT_LONG', 3); /* Signed 32-bit value */
41
+define('PT_R4', 4); /* 4-byte floating point */
42
+define('PT_DOUBLE', 5); /* Floating point double */
43
+define('PT_CURRENCY', 6); /* Signed 64-bit int (decimal w/    4 digits right of decimal pt) */
44
+define('PT_APPTIME', 7); /* Application time */
45
+define('PT_ERROR', 10); /* 32-bit error value */
46
+define('PT_BOOLEAN', 11); /* 16-bit boolean (non-zero true) */
47
+define('PT_OBJECT', 13); /* Embedded object in a property */
48
+define('PT_I8', 20); /* 8-byte signed integer */
49
+define('PT_STRING8', 30); /* Null terminated 8-bit character string */
50
+define('PT_UNICODE', 31); /* Null terminated Unicode string */
51
+define('PT_SYSTIME', 64); /* FILETIME 64-bit int w/ number of 100ns periods since Jan 1,1601 */
52
+define('PT_CLSID', 72); /* OLE GUID */
53
+define('PT_BINARY', 258); /* Uninterpreted (counted byte array) */
54 54
 /* Changes are likely to these numbers, and to their structures. */
55 55
 
56 56
 /* Alternate property type names for ease of use */
57
-define('PT_SHORT'                                ,PT_I2);
58
-define('PT_I4'                                   ,PT_LONG);
59
-define('PT_FLOAT'                                ,PT_R4);
60
-define('PT_R8'                                   ,PT_DOUBLE);
61
-define('PT_LONGLONG'                             ,PT_I8);
57
+define('PT_SHORT', PT_I2);
58
+define('PT_I4', PT_LONG);
59
+define('PT_FLOAT', PT_R4);
60
+define('PT_R8', PT_DOUBLE);
61
+define('PT_LONGLONG', PT_I8);
62 62
 
63 63
 
64
-define('PT_TSTRING'                              ,PT_STRING8);
64
+define('PT_TSTRING', PT_STRING8);
65 65
 
66 66
 
67 67
 
68
-define('PT_MV_I2'                                ,(MV_FLAG | PT_I2));
69
-define('PT_MV_LONG'                              ,(MV_FLAG | PT_LONG));
70
-define('PT_MV_R4'                                ,(MV_FLAG | PT_R4));
71
-define('PT_MV_DOUBLE'                            ,(MV_FLAG | PT_DOUBLE));
72
-define('PT_MV_CURRENCY'                          ,(MV_FLAG | PT_CURRENCY));
73
-define('PT_MV_APPTIME'                           ,(MV_FLAG | PT_APPTIME));
74
-define('PT_MV_SYSTIME'                           ,(MV_FLAG | PT_SYSTIME));
75
-define('PT_MV_STRING8'                           ,(MV_FLAG | PT_STRING8));
76
-define('PT_MV_BINARY'                            ,(MV_FLAG | PT_BINARY));
77
-define('PT_MV_UNICODE'                           ,(MV_FLAG | PT_UNICODE));
78
-define('PT_MV_CLSID'                             ,(MV_FLAG | PT_CLSID));
79
-define('PT_MV_I8'                                ,(MV_FLAG | PT_I8));
68
+define('PT_MV_I2', (MV_FLAG|PT_I2));
69
+define('PT_MV_LONG', (MV_FLAG|PT_LONG));
70
+define('PT_MV_R4', (MV_FLAG|PT_R4));
71
+define('PT_MV_DOUBLE', (MV_FLAG|PT_DOUBLE));
72
+define('PT_MV_CURRENCY', (MV_FLAG|PT_CURRENCY));
73
+define('PT_MV_APPTIME', (MV_FLAG|PT_APPTIME));
74
+define('PT_MV_SYSTIME', (MV_FLAG|PT_SYSTIME));
75
+define('PT_MV_STRING8', (MV_FLAG|PT_STRING8));
76
+define('PT_MV_BINARY', (MV_FLAG|PT_BINARY));
77
+define('PT_MV_UNICODE', (MV_FLAG|PT_UNICODE));
78
+define('PT_MV_CLSID', (MV_FLAG|PT_CLSID));
79
+define('PT_MV_I8', (MV_FLAG|PT_I8));
80 80
 
81
-define('PT_MV_TSTRING'                           ,PT_MV_STRING8);
81
+define('PT_MV_TSTRING', PT_MV_STRING8);
82 82
 /* bit 0: set if descending, clear if ascending */
83 83
 
84
-define('TABLE_SORT_ASCEND'                       ,(0x00000000));
85
-define('TABLE_SORT_DESCEND'                      ,(0x00000001));
86
-define('TABLE_SORT_COMBINE'                      ,(0x00000002));
84
+define('TABLE_SORT_ASCEND', (0x00000000));
85
+define('TABLE_SORT_DESCEND', (0x00000001));
86
+define('TABLE_SORT_COMBINE', (0x00000002));
87 87
 
88 88
 /* Bookmarks in Table */
89
-define('BOOKMARK_BEGINNING'                      , 0); /* Before first row */
90
-define('BOOKMARK_CURRENT'                        , 1); /* Before current row */
91
-define('BOOKMARK_END'                            , 2); /* After last row */
89
+define('BOOKMARK_BEGINNING', 0); /* Before first row */
90
+define('BOOKMARK_CURRENT', 1); /* Before current row */
91
+define('BOOKMARK_END', 2); /* After last row */
92 92
 
93
-define('MAPI_UNICODE'                            ,0x80000000);
93
+define('MAPI_UNICODE', 0x80000000);
94 94
 
95 95
 /* IMAPIFolder Interface --------------------------------------------------- */
96
-define('CONVENIENT_DEPTH'                        ,0x00000001);
97
-define('SEARCH_RUNNING'                          ,0x00000001);
98
-define('SEARCH_REBUILD'                          ,0x00000002);
99
-define('SEARCH_RECURSIVE'                        ,0x00000004);
100
-define('SEARCH_FOREGROUND'                       ,0x00000008);
101
-define('STOP_SEARCH'                             ,0x00000001);
102
-define('RESTART_SEARCH'                          ,0x00000002);
103
-define('RECURSIVE_SEARCH'                        ,0x00000004);
104
-define('SHALLOW_SEARCH'                          ,0x00000008);
105
-define('FOREGROUND_SEARCH'                       ,0x00000010);
106
-define('BACKGROUND_SEARCH'                       ,0x00000020);
96
+define('CONVENIENT_DEPTH', 0x00000001);
97
+define('SEARCH_RUNNING', 0x00000001);
98
+define('SEARCH_REBUILD', 0x00000002);
99
+define('SEARCH_RECURSIVE', 0x00000004);
100
+define('SEARCH_FOREGROUND', 0x00000008);
101
+define('STOP_SEARCH', 0x00000001);
102
+define('RESTART_SEARCH', 0x00000002);
103
+define('RECURSIVE_SEARCH', 0x00000004);
104
+define('SHALLOW_SEARCH', 0x00000008);
105
+define('FOREGROUND_SEARCH', 0x00000010);
106
+define('BACKGROUND_SEARCH', 0x00000020);
107 107
 
108 108
 /* IMAPIFolder folder type (enum) */
109 109
 
110
-define('FOLDER_ROOT'                             ,0x00000000);
111
-define('FOLDER_GENERIC'                          ,0x00000001);
112
-define('FOLDER_SEARCH'                           ,0x00000002);
110
+define('FOLDER_ROOT', 0x00000000);
111
+define('FOLDER_GENERIC', 0x00000001);
112
+define('FOLDER_SEARCH', 0x00000002);
113 113
 
114 114
 /* CreateMessage */
115 115
 /****** MAPI_DEFERRED_ERRORS    ((ULONG) 0x00000008) below */
@@ -117,188 +117,188 @@  discard block
 block discarded – undo
117 117
 
118 118
 /* CopyMessages */
119 119
 
120
-define('MESSAGE_MOVE'                            ,0x00000001);
121
-define('MESSAGE_DIALOG'                          ,0x00000002);
120
+define('MESSAGE_MOVE', 0x00000001);
121
+define('MESSAGE_DIALOG', 0x00000002);
122 122
 /****** MAPI_DECLINE_OK         ((ULONG) 0x00000004) above */
123 123
 
124 124
 /* CreateFolder */
125 125
 
126
-define('OPEN_IF_EXISTS'                          ,0x00000001);
126
+define('OPEN_IF_EXISTS', 0x00000001);
127 127
 /****** MAPI_DEFERRED_ERRORS    ((ULONG) 0x00000008) below */
128 128
 /****** MAPI_UNICODE            ((ULONG) 0x80000000) above */
129 129
 
130 130
 /* DeleteFolder */
131 131
 
132
-define('DEL_MESSAGES'                            ,0x00000001);
133
-define('FOLDER_DIALOG'                           ,0x00000002);
134
-define('DEL_FOLDERS'                             ,0x00000004);
132
+define('DEL_MESSAGES', 0x00000001);
133
+define('FOLDER_DIALOG', 0x00000002);
134
+define('DEL_FOLDERS', 0x00000004);
135 135
 
136 136
 /* EmptyFolder */
137
-define('DEL_ASSOCIATED'                          ,0x00000008);
137
+define('DEL_ASSOCIATED', 0x00000008);
138 138
 
139 139
 /* CopyFolder */
140 140
 
141
-define('FOLDER_MOVE'                             ,0x00000001);
141
+define('FOLDER_MOVE', 0x00000001);
142 142
 /****** FOLDER_DIALOG           ((ULONG) 0x00000002) above */
143 143
 /****** MAPI_DECLINE_OK         ((ULONG) 0x00000004) above */
144
-define('COPY_SUBFOLDERS'                         ,0x00000010);
144
+define('COPY_SUBFOLDERS', 0x00000010);
145 145
 /****** MAPI_UNICODE            ((ULONG) 0x80000000) above */
146 146
 
147 147
 
148 148
 /* SetReadFlags */
149 149
 
150
-define('SUPPRESS_RECEIPT'                        ,0x00000001);
150
+define('SUPPRESS_RECEIPT', 0x00000001);
151 151
 /****** FOLDER_DIALOG           ((ULONG) 0x00000002) above */
152
-define('CLEAR_READ_FLAG'                         ,0x00000004);
152
+define('CLEAR_READ_FLAG', 0x00000004);
153 153
 /****** MAPI_DEFERRED_ERRORS    ((ULONG) 0x00000008) below */
154
-define('GENERATE_RECEIPT_ONLY'                   ,0x00000010);
155
-define('CLEAR_RN_PENDING'                        ,0x00000020);
156
-define('CLEAR_NRN_PENDING'                       ,0x00000040);
154
+define('GENERATE_RECEIPT_ONLY', 0x00000010);
155
+define('CLEAR_RN_PENDING', 0x00000020);
156
+define('CLEAR_NRN_PENDING', 0x00000040);
157 157
 
158 158
 /* Flags defined in PR_MESSAGE_FLAGS */
159 159
 
160
-define('MSGFLAG_READ'                            ,0x00000001);
161
-define('MSGFLAG_UNMODIFIED'                      ,0x00000002);
162
-define('MSGFLAG_SUBMIT'                          ,0x00000004);
163
-define('MSGFLAG_UNSENT'                          ,0x00000008);
164
-define('MSGFLAG_HASATTACH'                       ,0x00000010);
165
-define('MSGFLAG_FROMME'                          ,0x00000020);
166
-define('MSGFLAG_ASSOCIATED'                      ,0x00000040);
167
-define('MSGFLAG_RESEND'                          ,0x00000080);
168
-define('MSGFLAG_RN_PENDING'                      ,0x00000100);
169
-define('MSGFLAG_NRN_PENDING'                     ,0x00000200);
160
+define('MSGFLAG_READ', 0x00000001);
161
+define('MSGFLAG_UNMODIFIED', 0x00000002);
162
+define('MSGFLAG_SUBMIT', 0x00000004);
163
+define('MSGFLAG_UNSENT', 0x00000008);
164
+define('MSGFLAG_HASATTACH', 0x00000010);
165
+define('MSGFLAG_FROMME', 0x00000020);
166
+define('MSGFLAG_ASSOCIATED', 0x00000040);
167
+define('MSGFLAG_RESEND', 0x00000080);
168
+define('MSGFLAG_RN_PENDING', 0x00000100);
169
+define('MSGFLAG_NRN_PENDING', 0x00000200);
170 170
 
171 171
 /* GetMessageStatus */
172 172
 
173
-define('MSGSTATUS_HIGHLIGHTED'                   ,0x00000001);
174
-define('MSGSTATUS_TAGGED'                        ,0x00000002);
175
-define('MSGSTATUS_HIDDEN'                        ,0x00000004);
176
-define('MSGSTATUS_DELMARKED'                     ,0x00000008);
173
+define('MSGSTATUS_HIGHLIGHTED', 0x00000001);
174
+define('MSGSTATUS_TAGGED', 0x00000002);
175
+define('MSGSTATUS_HIDDEN', 0x00000004);
176
+define('MSGSTATUS_DELMARKED', 0x00000008);
177 177
 
178 178
 /* Bits for remote message status */
179 179
 
180
-define('MSGSTATUS_REMOTE_DOWNLOAD'               ,0x00001000);
181
-define('MSGSTATUS_REMOTE_DELETE'                 ,0x00002000);
180
+define('MSGSTATUS_REMOTE_DOWNLOAD', 0x00001000);
181
+define('MSGSTATUS_REMOTE_DELETE', 0x00002000);
182 182
 
183 183
 /* SaveContentsSort */
184 184
 
185
-define('RECURSIVE_SORT'                          ,0x00000002);
185
+define('RECURSIVE_SORT', 0x00000002);
186 186
 
187 187
 /* PR_STATUS property */
188 188
 
189
-define('FLDSTATUS_HIGHLIGHTED'                   ,0x00000001);
190
-define('FLDSTATUS_TAGGED'                        ,0x00000002);
191
-define('FLDSTATUS_HIDDEN'                        ,0x00000004);
192
-define('FLDSTATUS_DELMARKED'                     ,0x00000008);
189
+define('FLDSTATUS_HIGHLIGHTED', 0x00000001);
190
+define('FLDSTATUS_TAGGED', 0x00000002);
191
+define('FLDSTATUS_HIDDEN', 0x00000004);
192
+define('FLDSTATUS_DELMARKED', 0x00000008);
193 193
 
194 194
 
195 195
 /* IMAPIStatus Interface --------------------------------------------------- */
196 196
 
197 197
 /* Values for PR_RESOURCE_TYPE, _METHODS, _FLAGS */
198 198
 
199
-define('MAPI_STORE_PROVIDER'                     , 33);    /* Message Store */
200
-define('MAPI_AB'                                 , 34);    /* Address Book */
201
-define('MAPI_AB_PROVIDER'                        , 35);    /* Address Book Provider */
202
-define('MAPI_TRANSPORT_PROVIDER'                 , 36);    /* Transport Provider */
203
-define('MAPI_SPOOLER'                            , 37);    /* Message Spooler */
204
-define('MAPI_PROFILE_PROVIDER'                   , 38);    /* Profile Provider */
205
-define('MAPI_SUBSYSTEM'                          , 39);    /* Overall Subsystem Status */
206
-define('MAPI_HOOK_PROVIDER'                      , 40);    /* Spooler Hook */
207
-define('STATUS_VALIDATE_STATE'                   ,0x00000001);
208
-define('STATUS_SETTINGS_DIALOG'                  ,0x00000002);
209
-define('STATUS_CHANGE_PASSWORD'                  ,0x00000004);
210
-define('STATUS_FLUSH_QUEUES'                     ,0x00000008);
211
-
212
-define('STATUS_DEFAULT_OUTBOUND'                 ,0x00000001);
213
-define('STATUS_DEFAULT_STORE'                    ,0x00000002);
214
-define('STATUS_PRIMARY_IDENTITY'                 ,0x00000004);
215
-define('STATUS_SIMPLE_STORE'                     ,0x00000008);
216
-define('STATUS_XP_PREFER_LAST'                   ,0x00000010);
217
-define('STATUS_NO_PRIMARY_IDENTITY'              ,0x00000020);
218
-define('STATUS_NO_DEFAULT_STORE'                 ,0x00000040);
219
-define('STATUS_TEMP_SECTION'                     ,0x00000080);
220
-define('STATUS_OWN_STORE'                        ,0x00000100);
221
-define('STATUS_NEED_IPM_TREE'                    ,0x00000800);
222
-define('STATUS_PRIMARY_STORE'                    ,0x00001000);
223
-define('STATUS_SECONDARY_STORE'                  ,0x00002000);
199
+define('MAPI_STORE_PROVIDER', 33); /* Message Store */
200
+define('MAPI_AB', 34); /* Address Book */
201
+define('MAPI_AB_PROVIDER', 35); /* Address Book Provider */
202
+define('MAPI_TRANSPORT_PROVIDER', 36); /* Transport Provider */
203
+define('MAPI_SPOOLER', 37); /* Message Spooler */
204
+define('MAPI_PROFILE_PROVIDER', 38); /* Profile Provider */
205
+define('MAPI_SUBSYSTEM', 39); /* Overall Subsystem Status */
206
+define('MAPI_HOOK_PROVIDER', 40); /* Spooler Hook */
207
+define('STATUS_VALIDATE_STATE', 0x00000001);
208
+define('STATUS_SETTINGS_DIALOG', 0x00000002);
209
+define('STATUS_CHANGE_PASSWORD', 0x00000004);
210
+define('STATUS_FLUSH_QUEUES', 0x00000008);
211
+
212
+define('STATUS_DEFAULT_OUTBOUND', 0x00000001);
213
+define('STATUS_DEFAULT_STORE', 0x00000002);
214
+define('STATUS_PRIMARY_IDENTITY', 0x00000004);
215
+define('STATUS_SIMPLE_STORE', 0x00000008);
216
+define('STATUS_XP_PREFER_LAST', 0x00000010);
217
+define('STATUS_NO_PRIMARY_IDENTITY', 0x00000020);
218
+define('STATUS_NO_DEFAULT_STORE', 0x00000040);
219
+define('STATUS_TEMP_SECTION', 0x00000080);
220
+define('STATUS_OWN_STORE', 0x00000100);
221
+define('STATUS_NEED_IPM_TREE', 0x00000800);
222
+define('STATUS_PRIMARY_STORE', 0x00001000);
223
+define('STATUS_SECONDARY_STORE', 0x00002000);
224 224
 
225 225
 
226 226
 /* ------------ */
227 227
 /* Random flags */
228 228
 
229 229
 /* Flag for deferred error */
230
-define('MAPI_DEFERRED_ERRORS'                    ,0x00000008);
230
+define('MAPI_DEFERRED_ERRORS', 0x00000008);
231 231
 
232 232
 /* Flag for creating and using Folder Associated Information Messages */
233
-define('MAPI_ASSOCIATED'                         ,0x00000040);
233
+define('MAPI_ASSOCIATED', 0x00000040);
234 234
 
235 235
 /* Flags for OpenMessageStore() */
236 236
 
237
-define('MDB_NO_DIALOG'                           ,0x00000001);
238
-define('MDB_WRITE'                               ,0x00000004);
237
+define('MDB_NO_DIALOG', 0x00000001);
238
+define('MDB_WRITE', 0x00000004);
239 239
 /****** MAPI_DEFERRED_ERRORS    ((ULONG) 0x00000008) above */
240 240
 /****** MAPI_BEST_ACCESS        ((ULONG) 0x00000010) above */
241
-define('MDB_TEMPORARY'                           ,0x00000020);
242
-define('MDB_NO_MAIL'                             ,0x00000080);
241
+define('MDB_TEMPORARY', 0x00000020);
242
+define('MDB_NO_MAIL', 0x00000080);
243 243
 
244 244
 /* Flags for OpenAddressBook */
245 245
 
246
-define('AB_NO_DIALOG'                            ,0x00000001);
246
+define('AB_NO_DIALOG', 0x00000001);
247 247
 
248 248
 /* ((ULONG) 0x00000001 is not a valid flag on ModifyRecipients. */
249
-define('MODRECIP_ADD'                            ,0x00000002);
250
-define('MODRECIP_MODIFY'                         ,0x00000004);
251
-define('MODRECIP_REMOVE'                         ,0x00000008);
249
+define('MODRECIP_ADD', 0x00000002);
250
+define('MODRECIP_MODIFY', 0x00000004);
251
+define('MODRECIP_REMOVE', 0x00000008);
252 252
 
253 253
 
254
-define('MAPI_ORIG'                               ,0);          /* Recipient is message originator          */
255
-define('MAPI_TO'                                 ,1);          /* Recipient is a primary recipient         */
256
-define('MAPI_CC'                                 ,2);          /* Recipient is a copy recipient            */
257
-define('MAPI_BCC'                                ,3);          /* Recipient is blind copy recipient        */
254
+define('MAPI_ORIG', 0); /* Recipient is message originator          */
255
+define('MAPI_TO', 1); /* Recipient is a primary recipient         */
256
+define('MAPI_CC', 2); /* Recipient is a copy recipient            */
257
+define('MAPI_BCC', 3); /* Recipient is blind copy recipient        */
258 258
 
259 259
 
260 260
 /* IAttach Interface ------------------------------------------------------- */
261 261
 
262 262
 /* IAttach attachment methods: PR_ATTACH_METHOD values */
263 263
 
264
-define('NO_ATTACHMENT'                           ,0x00000000);
265
-define('ATTACH_BY_VALUE'                         ,0x00000001);
266
-define('ATTACH_BY_REFERENCE'                     ,0x00000002);
267
-define('ATTACH_BY_REF_RESOLVE'                   ,0x00000003);
268
-define('ATTACH_BY_REF_ONLY'                      ,0x00000004);
269
-define('ATTACH_EMBEDDED_MSG'                     ,0x00000005);
270
-define('ATTACH_OLE'                              ,0x00000006);
264
+define('NO_ATTACHMENT', 0x00000000);
265
+define('ATTACH_BY_VALUE', 0x00000001);
266
+define('ATTACH_BY_REFERENCE', 0x00000002);
267
+define('ATTACH_BY_REF_RESOLVE', 0x00000003);
268
+define('ATTACH_BY_REF_ONLY', 0x00000004);
269
+define('ATTACH_EMBEDDED_MSG', 0x00000005);
270
+define('ATTACH_OLE', 0x00000006);
271 271
 
272 272
 /* OpenProperty  - ulFlags */
273
-define('MAPI_MODIFY'                             ,0x00000001);
274
-define('MAPI_CREATE'                             ,0x00000002);
275
-define('STREAM_APPEND'                           ,0x00000004);
273
+define('MAPI_MODIFY', 0x00000001);
274
+define('MAPI_CREATE', 0x00000002);
275
+define('STREAM_APPEND', 0x00000004);
276 276
 /****** MAPI_DEFERRED_ERRORS    ((ULONG) 0x00000008) below */
277 277
 
278 278
 
279 279
 /* PR_PRIORITY values */
280
-define('PRIO_URGENT'                             , 1);
281
-define('PRIO_NORMAL'                             , 0);
282
-define('PRIO_NONURGENT'                          ,-1);
280
+define('PRIO_URGENT', 1);
281
+define('PRIO_NORMAL', 0);
282
+define('PRIO_NONURGENT', -1);
283 283
 
284 284
 /* PR_SENSITIVITY values */
285
-define('SENSITIVITY_NONE'                        ,0x00000000);
286
-define('SENSITIVITY_PERSONAL'                    ,0x00000001);
287
-define('SENSITIVITY_PRIVATE'                     ,0x00000002);
288
-define('SENSITIVITY_COMPANY_CONFIDENTIAL'        ,0x00000003);
285
+define('SENSITIVITY_NONE', 0x00000000);
286
+define('SENSITIVITY_PERSONAL', 0x00000001);
287
+define('SENSITIVITY_PRIVATE', 0x00000002);
288
+define('SENSITIVITY_COMPANY_CONFIDENTIAL', 0x00000003);
289 289
 
290 290
 /* PR_IMPORTANCE values */
291
-define('IMPORTANCE_LOW'                          ,0);
292
-define('IMPORTANCE_NORMAL'                       ,1);
293
-define('IMPORTANCE_HIGH'                         ,2);
291
+define('IMPORTANCE_LOW', 0);
292
+define('IMPORTANCE_NORMAL', 1);
293
+define('IMPORTANCE_HIGH', 2);
294 294
 
295 295
 /* Stream interface values */
296
-define('STREAM_SEEK_SET'                         ,0);
297
-define('STREAM_SEEK_CUR'                         ,1);
298
-define('STREAM_SEEK_END'                         ,2);
296
+define('STREAM_SEEK_SET', 0);
297
+define('STREAM_SEEK_CUR', 1);
298
+define('STREAM_SEEK_END', 2);
299 299
 
300
-define('SHOW_SOFT_DELETES'                       ,0x00000002);
301
-define('DELETE_HARD_DELETE'                      ,0x00000010);
300
+define('SHOW_SOFT_DELETES', 0x00000002);
301
+define('DELETE_HARD_DELETE', 0x00000010);
302 302
 
303 303
 /*
304 304
  *    The following flags are used to indicate to the client what access
@@ -306,78 +306,78 @@  discard block
 block discarded – undo
306 306
  *    message and folder objects as well as in contents and associated
307 307
  *    contents tables
308 308
  */
309
-define('MAPI_ACCESS_MODIFY'                      ,0x00000001);
310
-define('MAPI_ACCESS_READ'                        ,0x00000002);
311
-define('MAPI_ACCESS_DELETE'                      ,0x00000004);
312
-define('MAPI_ACCESS_CREATE_HIERARCHY'            ,0x00000008);
313
-define('MAPI_ACCESS_CREATE_CONTENTS'             ,0x00000010);
314
-define('MAPI_ACCESS_CREATE_ASSOCIATED'           ,0x00000020);
309
+define('MAPI_ACCESS_MODIFY', 0x00000001);
310
+define('MAPI_ACCESS_READ', 0x00000002);
311
+define('MAPI_ACCESS_DELETE', 0x00000004);
312
+define('MAPI_ACCESS_CREATE_HIERARCHY', 0x00000008);
313
+define('MAPI_ACCESS_CREATE_CONTENTS', 0x00000010);
314
+define('MAPI_ACCESS_CREATE_ASSOCIATED', 0x00000020);
315 315
 
316
-define('MAPI_SEND_NO_RICH_INFO'                  ,0x00010000);
316
+define('MAPI_SEND_NO_RICH_INFO', 0x00010000);
317 317
 
318 318
 /* flags for PR_STORE_SUPPORT_MASK */
319
-define('STORE_ANSI_OK'                           ,0x00020000); // The message store supports properties containing ANSI (8-bit) characters.
320
-define('STORE_ATTACH_OK'                         ,0x00000020); // The message store supports attachments (OLE or non-OLE) to messages.
321
-define('STORE_CATEGORIZE_OK'                     ,0x00000400); // The message store supports categorized views of tables.
322
-define('STORE_CREATE_OK'                         ,0x00000010); // The message store supports creation of new messages.
323
-define('STORE_ENTRYID_UNIQUE'                    ,0x00000001); // Entry identifiers for the objects in the message store are unique, that is, never reused during the life of the store.
324
-define('STORE_HTML_OK'                           ,0x00010000); // The message store supports Hypertext Markup Language (HTML) messages, stored in the PR_BODY_HTML property. Note that STORE_HTML_OK is not defined in versions of MAPIDEFS.H included with Microsoft� Exchange 2000 Server and earlier. If your development environment uses a MAPIDEFS.H file that does not include STORE_HTML_OK, use the value 0x00010000 instead.
325
-define('STORE_LOCALSTORE'                        ,0x00080000); // This flag is reserved and should not be used.
326
-define('STORE_MODIFY_OK'                         ,0x00000008); // The message store supports modification of its existing messages.
327
-define('STORE_MV_PROPS_OK'                       ,0x00000200); // The message store supports multivalued properties, guarantees the stability of value order in a multivalued property throughout a save operation, and supports instantiation of multivalued properties in tables.
328
-define('STORE_NOTIFY_OK'                         ,0x00000100); // The message store supports notifications.
329
-define('STORE_OLE_OK'                            ,0x00000040); // The message store supports OLE attachments. The OLE data is accessible through an IStorage interface, such as that available through the PR_ATTACH_DATA_OBJ property.
330
-define('STORE_PUBLIC_FOLDERS'                    ,0x00004000); // The folders in this store are public (multi-user), not private (possibly multi-instance but not multi-user).
331
-define('STORE_READONLY'                          ,0x00000002); // All interfaces for the message store have a read-only access level.
332
-define('STORE_RESTRICTION_OK'                    ,0x00001000); // The message store supports restrictions.
333
-define('STORE_RTF_OK'                            ,0x00000800); // The message store supports Rich Text Format (RTF) messages, usually stored compressed, and the store itself keeps PR_BODY and PR_RTF_COMPRESSED synchronized.
334
-define('STORE_SEARCH_OK'                         ,0x00000004); // The message store supports search-results folders.
335
-define('STORE_SORT_OK'                           ,0x00002000); // The message store supports sorting views of tables.
336
-define('STORE_SUBMIT_OK'                         ,0x00000080); // The message store supports marking a message for submission.
337
-define('STORE_UNCOMPRESSED_RTF'                  ,0x00008000); // The message store supports storage of Rich Text Format (RTF) messages in uncompressed form. An uncompressed RTF stream is identified by the value dwMagicUncompressedRTF in the stream header. The dwMagicUncompressedRTF value is defined in the RTFLIB.H file.
338
-define('STORE_UNICODE_OK'                        ,0x00040000); // The message store supports properties containing Unicode characters.
319
+define('STORE_ANSI_OK', 0x00020000); // The message store supports properties containing ANSI (8-bit) characters.
320
+define('STORE_ATTACH_OK', 0x00000020); // The message store supports attachments (OLE or non-OLE) to messages.
321
+define('STORE_CATEGORIZE_OK', 0x00000400); // The message store supports categorized views of tables.
322
+define('STORE_CREATE_OK', 0x00000010); // The message store supports creation of new messages.
323
+define('STORE_ENTRYID_UNIQUE', 0x00000001); // Entry identifiers for the objects in the message store are unique, that is, never reused during the life of the store.
324
+define('STORE_HTML_OK', 0x00010000); // The message store supports Hypertext Markup Language (HTML) messages, stored in the PR_BODY_HTML property. Note that STORE_HTML_OK is not defined in versions of MAPIDEFS.H included with Microsoft� Exchange 2000 Server and earlier. If your development environment uses a MAPIDEFS.H file that does not include STORE_HTML_OK, use the value 0x00010000 instead.
325
+define('STORE_LOCALSTORE', 0x00080000); // This flag is reserved and should not be used.
326
+define('STORE_MODIFY_OK', 0x00000008); // The message store supports modification of its existing messages.
327
+define('STORE_MV_PROPS_OK', 0x00000200); // The message store supports multivalued properties, guarantees the stability of value order in a multivalued property throughout a save operation, and supports instantiation of multivalued properties in tables.
328
+define('STORE_NOTIFY_OK', 0x00000100); // The message store supports notifications.
329
+define('STORE_OLE_OK', 0x00000040); // The message store supports OLE attachments. The OLE data is accessible through an IStorage interface, such as that available through the PR_ATTACH_DATA_OBJ property.
330
+define('STORE_PUBLIC_FOLDERS', 0x00004000); // The folders in this store are public (multi-user), not private (possibly multi-instance but not multi-user).
331
+define('STORE_READONLY', 0x00000002); // All interfaces for the message store have a read-only access level.
332
+define('STORE_RESTRICTION_OK', 0x00001000); // The message store supports restrictions.
333
+define('STORE_RTF_OK', 0x00000800); // The message store supports Rich Text Format (RTF) messages, usually stored compressed, and the store itself keeps PR_BODY and PR_RTF_COMPRESSED synchronized.
334
+define('STORE_SEARCH_OK', 0x00000004); // The message store supports search-results folders.
335
+define('STORE_SORT_OK', 0x00002000); // The message store supports sorting views of tables.
336
+define('STORE_SUBMIT_OK', 0x00000080); // The message store supports marking a message for submission.
337
+define('STORE_UNCOMPRESSED_RTF', 0x00008000); // The message store supports storage of Rich Text Format (RTF) messages in uncompressed form. An uncompressed RTF stream is identified by the value dwMagicUncompressedRTF in the stream header. The dwMagicUncompressedRTF value is defined in the RTFLIB.H file.
338
+define('STORE_UNICODE_OK', 0x00040000); // The message store supports properties containing Unicode characters.
339 339
 
340 340
 
341 341
 /*  PR_DISPLAY_TYPEs                 */
342 342
 /*  For address book contents tables */
343
-define('DT_MAILUSER'                             ,0x00000000);
344
-define('DT_DISTLIST'                             ,0x00000001);
345
-define('DT_FORUM'                                ,0x00000002);
346
-define('DT_AGENT'                                ,0x00000003);
347
-define('DT_ORGANIZATION'                         ,0x00000004);
348
-define('DT_PRIVATE_DISTLIST'                     ,0x00000005);
349
-define('DT_REMOTE_MAILUSER'                      ,0x00000006);
343
+define('DT_MAILUSER', 0x00000000);
344
+define('DT_DISTLIST', 0x00000001);
345
+define('DT_FORUM', 0x00000002);
346
+define('DT_AGENT', 0x00000003);
347
+define('DT_ORGANIZATION', 0x00000004);
348
+define('DT_PRIVATE_DISTLIST', 0x00000005);
349
+define('DT_REMOTE_MAILUSER', 0x00000006);
350 350
 
351 351
 /* For address book hierarchy tables */
352
-define('DT_MODIFIABLE'                           ,0x00010000);
353
-define('DT_GLOBAL'                               ,0x00020000);
354
-define('DT_LOCAL'                                ,0x00030000);
355
-define('DT_WAN'                                  ,0x00040000);
356
-define('DT_NOT_SPECIFIC'                         ,0x00050000);
352
+define('DT_MODIFIABLE', 0x00010000);
353
+define('DT_GLOBAL', 0x00020000);
354
+define('DT_LOCAL', 0x00030000);
355
+define('DT_WAN', 0x00040000);
356
+define('DT_NOT_SPECIFIC', 0x00050000);
357 357
 
358 358
 /* For folder hierarchy tables */
359
-define('DT_FOLDER'                               ,0x01000000);
360
-define('DT_FOLDER_LINK'                          ,0x02000000);
361
-define('DT_FOLDER_SPECIAL'                       ,0x04000000);
359
+define('DT_FOLDER', 0x01000000);
360
+define('DT_FOLDER_LINK', 0x02000000);
361
+define('DT_FOLDER_SPECIAL', 0x04000000);
362 362
 
363 363
 /* PR_DISPLAY_TYPE_EX values */
364
-define('DT_ROOM'                                 ,0x00000007);
365
-define('DT_EQUIPMENT'                            ,0x00000008);
366
-define('DT_SEC_DISTLIST'                         ,0x00000009);
364
+define('DT_ROOM', 0x00000007);
365
+define('DT_EQUIPMENT', 0x00000008);
366
+define('DT_SEC_DISTLIST', 0x00000009);
367 367
 
368 368
 /* PR_DISPLAY_TYPE_EX flags */
369
-define('DTE_FLAG_REMOTE_VALID'                   ,0x80000000);
370
-define('DTE_FLAG_ACL_CAPABLE'                    ,0x40000000); /* on for DT_MAILUSER and DT_SEC_DISTLIST */
371
-define('DTE_MASK_REMOTE'                         ,0x0000FF00);
372
-define('DTE_MASK_LOCAL'                          ,0x000000FF);
369
+define('DTE_FLAG_REMOTE_VALID', 0x80000000);
370
+define('DTE_FLAG_ACL_CAPABLE', 0x40000000); /* on for DT_MAILUSER and DT_SEC_DISTLIST */
371
+define('DTE_MASK_REMOTE', 0x0000FF00);
372
+define('DTE_MASK_LOCAL', 0x000000FF);
373 373
 
374 374
 /* OlResponseStatus */
375
-define('olResponseNone'                          ,0);
376
-define('olResponseOrganized'                     ,1);
377
-define('olResponseTentative'                     ,2);
378
-define('olResponseAccepted'                      ,3);
379
-define('olResponseDeclined'                      ,4);
380
-define('olResponseNotResponded'                  ,5);
375
+define('olResponseNone', 0);
376
+define('olResponseOrganized', 1);
377
+define('olResponseTentative', 2);
378
+define('olResponseAccepted', 3);
379
+define('olResponseDeclined', 4);
380
+define('olResponseNotResponded', 5);
381 381
 
382 382
 /* OlRecipientTrackStatus to set PR_RECIPIENT_TRACKSTATUS in recipient table
383 383
  * Value of the recipient trackstatus are same as OlResponseStatus but
@@ -385,282 +385,282 @@  discard block
 block discarded – undo
385 385
  * and olResponseNone has different interpretation with PR_RECIPIENT_TRACKSTATUS
386 386
  * so to avoid confusions we have defined new constants.
387 387
 */
388
-define('olRecipientTrackStatusNone'              ,0);
389
-define('olRecipientTrackStatusTentative'         ,2);
390
-define('olRecipientTrackStatusAccepted'          ,3);
391
-define('olRecipientTrackStatusDeclined'          ,4);
388
+define('olRecipientTrackStatusNone', 0);
389
+define('olRecipientTrackStatusTentative', 2);
390
+define('olRecipientTrackStatusAccepted', 3);
391
+define('olRecipientTrackStatusDeclined', 4);
392 392
 
393 393
 /* OlMeetingStatus */
394
-define('olNonMeeting'                            ,0);
395
-define('olMeeting'                               ,1);
396
-define('olMeetingReceived'                       ,3);
397
-define('olMeetingCanceled'                       ,5);
398
-define('olMeetingReceivedAndCanceled'            ,7);
394
+define('olNonMeeting', 0);
395
+define('olMeeting', 1);
396
+define('olMeetingReceived', 3);
397
+define('olMeetingCanceled', 5);
398
+define('olMeetingReceivedAndCanceled', 7);
399 399
 
400 400
 /*    OlMeetingResponse */
401
-define('olMeetingTentative'                      ,2);
402
-define('olMeetingAccepted'                       ,3);
403
-define('olMeetingDeclined'                       ,4);
401
+define('olMeetingTentative', 2);
402
+define('olMeetingAccepted', 3);
403
+define('olMeetingDeclined', 4);
404 404
 
405 405
 /* OL Attendee type */
406
-define('olAttendeeRequired'                      ,1);
407
-define('olAttendeeOptional'                      ,2);
408
-define('olAttendeeResource'                      ,3);
406
+define('olAttendeeRequired', 1);
407
+define('olAttendeeOptional', 2);
408
+define('olAttendeeResource', 3);
409 409
 
410 410
 /* task status */
411
-define('olTaskNotStarted'                        ,0);
412
-define('olTaskInProgress'                        ,1);
413
-define('olTaskComplete'                          ,2);
414
-define('olTaskWaiting'                           ,3);
415
-define('olTaskDeferred'                          ,4);
411
+define('olTaskNotStarted', 0);
412
+define('olTaskInProgress', 1);
413
+define('olTaskComplete', 2);
414
+define('olTaskWaiting', 3);
415
+define('olTaskDeferred', 4);
416 416
 
417 417
 /* restrictions */
418
-define('RES_AND'                                 ,0);
419
-define('RES_OR'                                  ,1);
420
-define('RES_NOT'                                 ,2);
421
-define('RES_CONTENT'                             ,3);
422
-define('RES_PROPERTY'                            ,4);
423
-define('RES_COMPAREPROPS'                        ,5);
424
-define('RES_BITMASK'                             ,6);
425
-define('RES_SIZE'                                ,7);
426
-define('RES_EXIST'                               ,8);
427
-define('RES_SUBRESTRICTION'                      ,9);
428
-define('RES_COMMENT'                             ,10);
418
+define('RES_AND', 0);
419
+define('RES_OR', 1);
420
+define('RES_NOT', 2);
421
+define('RES_CONTENT', 3);
422
+define('RES_PROPERTY', 4);
423
+define('RES_COMPAREPROPS', 5);
424
+define('RES_BITMASK', 6);
425
+define('RES_SIZE', 7);
426
+define('RES_EXIST', 8);
427
+define('RES_SUBRESTRICTION', 9);
428
+define('RES_COMMENT', 10);
429 429
 
430 430
 /* restriction compares */
431
-define('RELOP_LT'                                ,0);
432
-define('RELOP_LE'                                ,1);
433
-define('RELOP_GT'                                ,2);
434
-define('RELOP_GE'                                ,3);
435
-define('RELOP_EQ'                                ,4);
436
-define('RELOP_NE'                                ,5);
437
-define('RELOP_RE'                                ,6);
431
+define('RELOP_LT', 0);
432
+define('RELOP_LE', 1);
433
+define('RELOP_GT', 2);
434
+define('RELOP_GE', 3);
435
+define('RELOP_EQ', 4);
436
+define('RELOP_NE', 5);
437
+define('RELOP_RE', 6);
438 438
 
439 439
 /* string 'fuzzylevel' */
440
-define('FL_FULLSTRING'                           ,0x00000000);
441
-define('FL_SUBSTRING'                            ,0x00000001);
442
-define('FL_PREFIX'                               ,0x00000002);
443
-define('FL_IGNORECASE'                           ,0x00010000);
444
-define('FL_IGNORENONSPACE'                       ,0x00020000);
445
-define('FL_LOOSE'                                ,0x00040000);
440
+define('FL_FULLSTRING', 0x00000000);
441
+define('FL_SUBSTRING', 0x00000001);
442
+define('FL_PREFIX', 0x00000002);
443
+define('FL_IGNORECASE', 0x00010000);
444
+define('FL_IGNORENONSPACE', 0x00020000);
445
+define('FL_LOOSE', 0x00040000);
446 446
 
447 447
 /* bitmask restriction types */
448
-define('BMR_EQZ'                                 ,0x00000000);
449
-define('BMR_NEZ'                                 ,0x00000001);
448
+define('BMR_EQZ', 0x00000000);
449
+define('BMR_NEZ', 0x00000001);
450 450
 
451 451
 /* array index values of restrictions -- same values are used in php-ext/main.cpp::PHPArraytoSRestriction() */
452
-define('VALUE'                                   ,0);        // propval
453
-define('RELOP'                                   ,1);        // compare method
454
-define('FUZZYLEVEL'                              ,2);        // string search flags
455
-define('CB'                                      ,3);        // size restriction
456
-define('ULTYPE'                                  ,4);        // bit mask restriction type BMR_xxx
457
-define('ULMASK'                                  ,5);        // bitmask
458
-define('ULPROPTAG'                               ,6);        // property
459
-define('ULPROPTAG1'                              ,7);        // RES_COMPAREPROPS 1st property
460
-define('ULPROPTAG2'                              ,8);        // RES_COMPAREPROPS 2nd property
461
-define('PROPS'                                   ,9);        // RES_COMMENT properties
462
-define('RESTRICTION'                             ,10);       // RES_COMMENT and RES_SUBRESTRICTION restriction
452
+define('VALUE', 0); // propval
453
+define('RELOP', 1); // compare method
454
+define('FUZZYLEVEL', 2); // string search flags
455
+define('CB', 3); // size restriction
456
+define('ULTYPE', 4); // bit mask restriction type BMR_xxx
457
+define('ULMASK', 5); // bitmask
458
+define('ULPROPTAG', 6); // property
459
+define('ULPROPTAG1', 7); // RES_COMPAREPROPS 1st property
460
+define('ULPROPTAG2', 8); // RES_COMPAREPROPS 2nd property
461
+define('PROPS', 9); // RES_COMMENT properties
462
+define('RESTRICTION', 10); // RES_COMMENT and RES_SUBRESTRICTION restriction
463 463
 
464 464
 /* GUID's for PR_MDB_PROVIDER */
465
-define("ZARAFA_SERVICE_GUID"                     ,makeGuid("{3C253DCA-D227-443C-94FE-425FAB958C19}"));    // default store
466
-define("ZARAFA_STORE_PUBLIC_GUID"                ,makeGuid("{70FAB278-F7AF-CD11-9BC8-00AA002FC45A}"));    // public store
467
-define("ZARAFA_STORE_DELEGATE_GUID"              ,makeGuid("{7C7C1085-BC6D-4E53-9DAB-8A53F8DEF808}"));    // other store
468
-define('ZARAFA_STORE_ARCHIVER_GUID'              ,makeGuid("{BC8953AD-2E3F-4172-9404-896FF459870F}"));    // archive store
465
+define("ZARAFA_SERVICE_GUID", makeGuid("{3C253DCA-D227-443C-94FE-425FAB958C19}")); // default store
466
+define("ZARAFA_STORE_PUBLIC_GUID", makeGuid("{70FAB278-F7AF-CD11-9BC8-00AA002FC45A}")); // public store
467
+define("ZARAFA_STORE_DELEGATE_GUID", makeGuid("{7C7C1085-BC6D-4E53-9DAB-8A53F8DEF808}")); // other store
468
+define('ZARAFA_STORE_ARCHIVER_GUID', makeGuid("{BC8953AD-2E3F-4172-9404-896FF459870F}")); // archive store
469 469
 
470 470
 /* global profile section guid */
471
-define('pbGlobalProfileSectionGuid'              ,makeGuid("{C8B0DB13-05AA-1A10-9BB0-00AA002FC45A}"));
471
+define('pbGlobalProfileSectionGuid', makeGuid("{C8B0DB13-05AA-1A10-9BB0-00AA002FC45A}"));
472 472
 
473 473
 /* Zarafa Contacts provider GUID */
474
-define('ZARAFA_CONTACTS_GUID'                    ,makeGuid("{30047F72-92E3-DA4F-B86A-E52A7FE46571}"));
474
+define('ZARAFA_CONTACTS_GUID', makeGuid("{30047F72-92E3-DA4F-B86A-E52A7FE46571}"));
475 475
 
476 476
 /* Permissions */
477 477
 
478 478
 // Get permission type
479
-define('ACCESS_TYPE_DENIED'                      ,1);
480
-define('ACCESS_TYPE_GRANT'                       ,2);
481
-define('ACCESS_TYPE_BOTH'                        ,3);
482
-
483
-define('ecRightsNone'                            ,0x00000000);
484
-define('ecRightsReadAny'                         ,0x00000001);
485
-define('ecRightsCreate'                          ,0x00000002);
486
-define('ecRightsEditOwned'                       ,0x00000008);
487
-define('ecRightsDeleteOwned'                     ,0x00000010);
488
-define('ecRightsEditAny'                         ,0x00000020);
489
-define('ecRightsDeleteAny'                       ,0x00000040);
490
-define('ecRightsCreateSubfolder'                 ,0x00000080);
491
-define('ecRightsFolderAccess'                    ,0x00000100);
479
+define('ACCESS_TYPE_DENIED', 1);
480
+define('ACCESS_TYPE_GRANT', 2);
481
+define('ACCESS_TYPE_BOTH', 3);
482
+
483
+define('ecRightsNone', 0x00000000);
484
+define('ecRightsReadAny', 0x00000001);
485
+define('ecRightsCreate', 0x00000002);
486
+define('ecRightsEditOwned', 0x00000008);
487
+define('ecRightsDeleteOwned', 0x00000010);
488
+define('ecRightsEditAny', 0x00000020);
489
+define('ecRightsDeleteAny', 0x00000040);
490
+define('ecRightsCreateSubfolder', 0x00000080);
491
+define('ecRightsFolderAccess', 0x00000100);
492 492
 //define('ecrightsContact'                       ,0x00000200);
493
-define('ecRightsFolderVisible'                   ,0x00000400);
493
+define('ecRightsFolderVisible', 0x00000400);
494 494
 
495
-define('ecRightsAll'                             ,ecRightsReadAny | ecRightsCreate | ecRightsEditOwned | ecRightsDeleteOwned | ecRightsEditAny | ecRightsDeleteAny | ecRightsCreateSubfolder | ecRightsFolderAccess | ecRightsFolderVisible);
496
-define('ecRightsFullControl'                     ,ecRightsReadAny | ecRightsCreate | ecRightsEditOwned | ecRightsDeleteOwned | ecRightsEditAny | ecRightsDeleteAny | ecRightsCreateSubfolder | ecRightsFolderVisible);
497
-define('ecRightsDefault'                         ,ecRightsNone | ecRightsFolderVisible);
498
-define('ecRightsDefaultPublic'                   ,ecRightsReadAny | ecRightsFolderVisible);
499
-define('ecRightsAdmin'                           ,0x00001000);
500
-define('ecRightsAllMask'                         ,0x000015FB);
495
+define('ecRightsAll', ecRightsReadAny|ecRightsCreate|ecRightsEditOwned|ecRightsDeleteOwned|ecRightsEditAny|ecRightsDeleteAny|ecRightsCreateSubfolder|ecRightsFolderAccess|ecRightsFolderVisible);
496
+define('ecRightsFullControl', ecRightsReadAny|ecRightsCreate|ecRightsEditOwned|ecRightsDeleteOwned|ecRightsEditAny|ecRightsDeleteAny|ecRightsCreateSubfolder|ecRightsFolderVisible);
497
+define('ecRightsDefault', ecRightsNone|ecRightsFolderVisible);
498
+define('ecRightsDefaultPublic', ecRightsReadAny|ecRightsFolderVisible);
499
+define('ecRightsAdmin', 0x00001000);
500
+define('ecRightsAllMask', 0x000015FB);
501 501
 
502 502
 // Right change indication
503
-define('RIGHT_NORMAL'                            ,0x00);
504
-define('RIGHT_NEW'                               ,0x01);
505
-define('RIGHT_MODIFY'                            ,0x02);
506
-define('RIGHT_DELETED'                           ,0x04);
507
-define('RIGHT_AUTOUPDATE_DENIED'                 ,0x08);
503
+define('RIGHT_NORMAL', 0x00);
504
+define('RIGHT_NEW', 0x01);
505
+define('RIGHT_MODIFY', 0x02);
506
+define('RIGHT_DELETED', 0x04);
507
+define('RIGHT_AUTOUPDATE_DENIED', 0x08);
508 508
 
509 509
 // IExchangeModifyTable: defines for rules
510
-define('ROWLIST_REPLACE'                         ,0x0001);
511
-define('ROW_ADD'                                 ,0x0001);
512
-define('ROW_MODIFY'                              ,0x0002);
513
-define('ROW_REMOVE'                              ,0x0004);
514
-define('ROW_EMPTY'                               ,(ROW_ADD|ROW_REMOVE));
510
+define('ROWLIST_REPLACE', 0x0001);
511
+define('ROW_ADD', 0x0001);
512
+define('ROW_MODIFY', 0x0002);
513
+define('ROW_REMOVE', 0x0004);
514
+define('ROW_EMPTY', (ROW_ADD|ROW_REMOVE));
515 515
 
516 516
 // new property types
517
-define('PT_SRESTRICTION'                         ,0x00FD);
518
-define('PT_ACTIONS'                              ,0x00FE);
517
+define('PT_SRESTRICTION', 0x00FD);
518
+define('PT_ACTIONS', 0x00FE);
519 519
 // unused, I believe
520
-define('PT_FILE_HANDLE'                          ,0x0103);
521
-define('PT_FILE_EA'                              ,0x0104);
522
-define('PT_VIRTUAL'                              ,0x0105);
520
+define('PT_FILE_HANDLE', 0x0103);
521
+define('PT_FILE_EA', 0x0104);
522
+define('PT_VIRTUAL', 0x0105);
523 523
 
524 524
 // rules state
525
-define('ST_DISABLED'                             ,0x0000);
526
-define('ST_ENABLED'                              ,0x0001);
527
-define('ST_ERROR'                                ,0x0002);
528
-define('ST_ONLY_WHEN_OOF'                        ,0x0004);
529
-define('ST_KEEP_OOF_HIST'                        ,0x0008);
530
-define('ST_EXIT_LEVEL'                           ,0x0010);
531
-define('ST_SKIP_IF_SCL_IS_SAFE'                  ,0x0020);
532
-define('ST_RULE_PARSE_ERROR'                     ,0x0040);
533
-define('ST_CLEAR_OOF_HIST'                       ,0x80000000);
525
+define('ST_DISABLED', 0x0000);
526
+define('ST_ENABLED', 0x0001);
527
+define('ST_ERROR', 0x0002);
528
+define('ST_ONLY_WHEN_OOF', 0x0004);
529
+define('ST_KEEP_OOF_HIST', 0x0008);
530
+define('ST_EXIT_LEVEL', 0x0010);
531
+define('ST_SKIP_IF_SCL_IS_SAFE', 0x0020);
532
+define('ST_RULE_PARSE_ERROR', 0x0040);
533
+define('ST_CLEAR_OOF_HIST', 0x80000000);
534 534
 
535 535
 // action types
536
-define('OP_MOVE'                                 ,1);
537
-define('OP_COPY'                                 ,2);
538
-define('OP_REPLY'                                ,3);
539
-define('OP_OOF_REPLY'                            ,4);
540
-define('OP_DEFER_ACTION'                         ,5);
541
-define('OP_BOUNCE'                               ,6);
542
-define('OP_FORWARD'                              ,7);
543
-define('OP_DELEGATE'                             ,8);
544
-define('OP_TAG'                                  ,9);
545
-define('OP_DELETE'                               ,10);
546
-define('OP_MARK_AS_READ'                         ,11);
536
+define('OP_MOVE', 1);
537
+define('OP_COPY', 2);
538
+define('OP_REPLY', 3);
539
+define('OP_OOF_REPLY', 4);
540
+define('OP_DEFER_ACTION', 5);
541
+define('OP_BOUNCE', 6);
542
+define('OP_FORWARD', 7);
543
+define('OP_DELEGATE', 8);
544
+define('OP_TAG', 9);
545
+define('OP_DELETE', 10);
546
+define('OP_MARK_AS_READ', 11);
547 547
 
548 548
 // for OP_REPLY
549
-define('DO_NOT_SEND_TO_ORIGINATOR'               ,1);
550
-define('STOCK_REPLY_TEMPLATE'                    ,2);
549
+define('DO_NOT_SEND_TO_ORIGINATOR', 1);
550
+define('STOCK_REPLY_TEMPLATE', 2);
551 551
 
552 552
 // for OP_FORWARD
553
-define('FWD_PRESERVE_SENDER'                     ,1);
554
-define('FWD_DO_NOT_MUNGE_MSG'                    ,2);
555
-define('FWD_AS_ATTACHMENT'                       ,4);
553
+define('FWD_PRESERVE_SENDER', 1);
554
+define('FWD_DO_NOT_MUNGE_MSG', 2);
555
+define('FWD_AS_ATTACHMENT', 4);
556 556
 
557 557
 // scBounceCodevalues
558
-define('BOUNCE_MESSAGE_SIZE_TOO_LARGE'           ,13);
559
-define('BOUNCE_FORMS_MISMATCH'                   ,31);
560
-define('BOUNCE_ACCESS_DENIED'                    ,38);
558
+define('BOUNCE_MESSAGE_SIZE_TOO_LARGE', 13);
559
+define('BOUNCE_FORMS_MISMATCH', 31);
560
+define('BOUNCE_ACCESS_DENIED', 38);
561 561
 
562 562
 // Free/busystatus
563
-define('fbFree'                                  ,0);
564
-define('fbTentative'                             ,1);
565
-define('fbBusy'                                  ,2);
566
-define('fbOutOfOffice'                           ,3);
567
-define('fbWorkingElsewhere'                      ,4);
568
-define('fbNoData'                                ,4);
563
+define('fbFree', 0);
564
+define('fbTentative', 1);
565
+define('fbBusy', 2);
566
+define('fbOutOfOffice', 3);
567
+define('fbWorkingElsewhere', 4);
568
+define('fbNoData', 4);
569 569
 
570 570
 /* ICS flags */
571 571
 
572 572
 // For Synchronize()
573
-define('SYNC_UNICODE'                            ,0x01);
574
-define('SYNC_NO_DELETIONS'                       ,0x02);
575
-define('SYNC_NO_SOFT_DELETIONS'                  ,0x04);
576
-define('SYNC_READ_STATE'                         ,0x08);
577
-define('SYNC_ASSOCIATED'                         ,0x10);
578
-define('SYNC_NORMAL'                             ,0x20);
579
-define('SYNC_NO_CONFLICTS'                       ,0x40);
580
-define('SYNC_ONLY_SPECIFIED_PROPS'               ,0x80);
581
-define('SYNC_NO_FOREIGN_KEYS'                    ,0x100);
582
-define('SYNC_LIMITED_IMESSAGE'                   ,0x200);
583
-define('SYNC_CATCHUP'                            ,0x400);
584
-define('SYNC_NEW_MESSAGE'                        ,0x800);         // only applicable to ImportMessageChange()
585
-define('SYNC_MSG_SELECTIVE'                      ,0x1000);        // Used internally.      Will reject if used by clients.
586
-define('SYNC_BEST_BODY'                          ,0x2000);
587
-define('SYNC_IGNORE_SPECIFIED_ON_ASSOCIATED'     ,0x4000);
588
-define('SYNC_PROGRESS_MODE'                      ,0x8000);        // AirMapi progress mode
589
-define('SYNC_FXRECOVERMODE'                      ,0x10000);
590
-define('SYNC_DEFER_CONFIG'                       ,0x20000);
591
-define('SYNC_FORCE_UNICODE'                      ,0x40000);       // Forces server to return Unicode properties
592
-define('SYNC_STATE_READONLY'                     ,0x80000);       // Server will not update the states in the DB, setting up exporter with this flag states are read only
593
-
594
-define('EMS_AB_ADDRESS_LOOKUP'                   ,0x00000001);    // Flag for resolvename to resolve only exact matches
595
-
596
-define('TBL_BATCH'                               ,0x00000002);    // Batch multiple table commands
573
+define('SYNC_UNICODE', 0x01);
574
+define('SYNC_NO_DELETIONS', 0x02);
575
+define('SYNC_NO_SOFT_DELETIONS', 0x04);
576
+define('SYNC_READ_STATE', 0x08);
577
+define('SYNC_ASSOCIATED', 0x10);
578
+define('SYNC_NORMAL', 0x20);
579
+define('SYNC_NO_CONFLICTS', 0x40);
580
+define('SYNC_ONLY_SPECIFIED_PROPS', 0x80);
581
+define('SYNC_NO_FOREIGN_KEYS', 0x100);
582
+define('SYNC_LIMITED_IMESSAGE', 0x200);
583
+define('SYNC_CATCHUP', 0x400);
584
+define('SYNC_NEW_MESSAGE', 0x800); // only applicable to ImportMessageChange()
585
+define('SYNC_MSG_SELECTIVE', 0x1000); // Used internally.      Will reject if used by clients.
586
+define('SYNC_BEST_BODY', 0x2000);
587
+define('SYNC_IGNORE_SPECIFIED_ON_ASSOCIATED', 0x4000);
588
+define('SYNC_PROGRESS_MODE', 0x8000); // AirMapi progress mode
589
+define('SYNC_FXRECOVERMODE', 0x10000);
590
+define('SYNC_DEFER_CONFIG', 0x20000);
591
+define('SYNC_FORCE_UNICODE', 0x40000); // Forces server to return Unicode properties
592
+define('SYNC_STATE_READONLY', 0x80000); // Server will not update the states in the DB, setting up exporter with this flag states are read only
593
+
594
+define('EMS_AB_ADDRESS_LOOKUP', 0x00000001); // Flag for resolvename to resolve only exact matches
595
+
596
+define('TBL_BATCH', 0x00000002); // Batch multiple table commands
597 597
 
598 598
 /* Flags for recipients in exceptions */
599
-define('recipSendable'                           ,0x00000001);    // sendable attendee.
600
-define('recipOrganizer'                          ,0x00000002);    // meeting organizer
601
-define('recipExceptionalResponse'                ,0x00000010);    // attendee gave a response for the exception
602
-define('recipExceptionalDeleted'                 ,0x00000020);    // recipientRow exists, but it is treated as if the corresponding recipient is deleted from meeting
603
-define('recipOriginal'                           ,0x00000100);    // recipient is an original Attendee
604
-define('recipReserved'                           ,0x00000200);
599
+define('recipSendable', 0x00000001); // sendable attendee.
600
+define('recipOrganizer', 0x00000002); // meeting organizer
601
+define('recipExceptionalResponse', 0x00000010); // attendee gave a response for the exception
602
+define('recipExceptionalDeleted', 0x00000020); // recipientRow exists, but it is treated as if the corresponding recipient is deleted from meeting
603
+define('recipOriginal', 0x00000100); // recipient is an original Attendee
604
+define('recipReserved', 0x00000200);
605 605
 
606 606
 /* Flags which indicates type of Meeting Object */
607
-define('mtgEmpty'                                ,0x00000000);    // Unspecified.
608
-define('mtgRequest'                              ,0x00000001);    // Initial meeting request.
609
-define('mtgFull'                                 ,0x00010000);    // Full update.
610
-define('mtgInfo'                                 ,0x00020000);    // Informational update.
611
-define('mtgOutOfDate'                            ,0x00080000);    // A newer Meeting Request object or Meeting Update object was received after this one.
612
-define('mtgDelegatorCopy'                        ,0x00100000);    // This is set on the delegator's copy when a delegate will handle meeting-related objects.
607
+define('mtgEmpty', 0x00000000); // Unspecified.
608
+define('mtgRequest', 0x00000001); // Initial meeting request.
609
+define('mtgFull', 0x00010000); // Full update.
610
+define('mtgInfo', 0x00020000); // Informational update.
611
+define('mtgOutOfDate', 0x00080000); // A newer Meeting Request object or Meeting Update object was received after this one.
612
+define('mtgDelegatorCopy', 0x00100000); // This is set on the delegator's copy when a delegate will handle meeting-related objects.
613 613
 
614
-define('MAPI_ONE_OFF_UNICODE'                    ,0x8000);        // the flag that defines whether the embedded strings are Unicode in one off entryids.
615
-define('MAPI_ONE_OFF_NO_RICH_INFO'               ,0x0001);        // the flag that specifies whether the recipient gets TNEF or not.
614
+define('MAPI_ONE_OFF_UNICODE', 0x8000); // the flag that defines whether the embedded strings are Unicode in one off entryids.
615
+define('MAPI_ONE_OFF_NO_RICH_INFO', 0x0001); // the flag that specifies whether the recipient gets TNEF or not.
616 616
 
617 617
 /* Mask flags for mapi_msgstore_advise */
618
-define('fnevCriticalError'                       ,0x00000001);
619
-define('fnevNewMail'                             ,0x00000002);
620
-define('fnevObjectCreated'                       ,0x00000004);
621
-define('fnevObjectDeleted'                       ,0x00000008);
622
-define('fnevObjectModified'                      ,0x00000010);
623
-define('fnevObjectMoved'                         ,0x00000020);
624
-define('fnevObjectCopied'                        ,0x00000040);
625
-define('fnevSearchComplete'                      ,0x00000080);
626
-define('fnevTableModified'                       ,0x00000100);
627
-define('fnevStatusObjectModified'                ,0x00000200);
628
-define('fnevReservedForMapi'                     ,0x40000000);
629
-define('fnevExtended'                            ,0x80000000);
618
+define('fnevCriticalError', 0x00000001);
619
+define('fnevNewMail', 0x00000002);
620
+define('fnevObjectCreated', 0x00000004);
621
+define('fnevObjectDeleted', 0x00000008);
622
+define('fnevObjectModified', 0x00000010);
623
+define('fnevObjectMoved', 0x00000020);
624
+define('fnevObjectCopied', 0x00000040);
625
+define('fnevSearchComplete', 0x00000080);
626
+define('fnevTableModified', 0x00000100);
627
+define('fnevStatusObjectModified', 0x00000200);
628
+define('fnevReservedForMapi', 0x40000000);
629
+define('fnevExtended', 0x80000000);
630 630
 
631 631
 /* PersistBlockType values PR_IPM_OL2007_ENTRYIDS / PR_ADDITIONAL_REN_ENTRYIDS_EX PersistIDs*/
632
-define('PERSIST_SENTINEL'                        ,0x0000); // Indicates that the PersistData structure is the last one contained in the PidTagAdditionalRenEntryIdsEx property
633
-define('RSF_PID_RSS_SUBSCRIPTION'                ,0x8001); // Indicates that the structure contains data for the RSS Feeds folder
634
-define('RSF_PID_SEND_AND_TRACK'                  ,0x8002); // Indicates that the structure contains data for the Tracked Mail Processing folder
635
-define('RSF_PID_TODO_SEARCH'                     ,0x8004); // Indicates that the structure contains data for the To-Do folder
636
-define('RSF_PID_CONV_ACTIONS'                    ,0x8006); // Indicates that the structure contains data for the Conversation Action Settings folder
637
-define('RSF_PID_COMBINED_ACTIONS'                ,0x8007); // This value is reserved.
638
-define('RSF_PID_SUGGESTED_CONTACTS'              ,0x8008); // Indicates that the structure contains data for the Suggested Contacts folder.
639
-define('RSF_PID_CONTACT_SEARCH'                  ,0x8009); // Indicates that the structure contains data for the Contacts Search folder.
640
-define('RSF_PID_BUDDYLIST_PDLS'                  ,0x800A); // Indicates that the structure contains data for the IM Contacts List folder.
641
-define('RSF_PID_BUDDYLIST_CONTACTS'              ,0x800B); // Indicates that the structure contains data for the Quick Contacts folder.
632
+define('PERSIST_SENTINEL', 0x0000); // Indicates that the PersistData structure is the last one contained in the PidTagAdditionalRenEntryIdsEx property
633
+define('RSF_PID_RSS_SUBSCRIPTION', 0x8001); // Indicates that the structure contains data for the RSS Feeds folder
634
+define('RSF_PID_SEND_AND_TRACK', 0x8002); // Indicates that the structure contains data for the Tracked Mail Processing folder
635
+define('RSF_PID_TODO_SEARCH', 0x8004); // Indicates that the structure contains data for the To-Do folder
636
+define('RSF_PID_CONV_ACTIONS', 0x8006); // Indicates that the structure contains data for the Conversation Action Settings folder
637
+define('RSF_PID_COMBINED_ACTIONS', 0x8007); // This value is reserved.
638
+define('RSF_PID_SUGGESTED_CONTACTS', 0x8008); // Indicates that the structure contains data for the Suggested Contacts folder.
639
+define('RSF_PID_CONTACT_SEARCH', 0x8009); // Indicates that the structure contains data for the Contacts Search folder.
640
+define('RSF_PID_BUDDYLIST_PDLS', 0x800A); // Indicates that the structure contains data for the IM Contacts List folder.
641
+define('RSF_PID_BUDDYLIST_CONTACTS', 0x800B); // Indicates that the structure contains data for the Quick Contacts folder.
642 642
 
643 643
 /* PersistElementType Values ElementIDs for persist data of PR_IPM_OL2007_ENTRYIDS / PR_ADDITIONAL_REN_ENTRYIDS_EX */
644
-define('ELEMENT_SENTINEL'                        ,0x0000); // 0 bytes Indicates that the PersistElement structure is the last one contained in the DataElements field of the PersistData structure.
645
-define('RSF_ELID_ENTRYID'                        ,0x0001); // variable Indicates that the ElementData field contains the entry ID of the special folder
644
+define('ELEMENT_SENTINEL', 0x0000); // 0 bytes Indicates that the PersistElement structure is the last one contained in the DataElements field of the PersistData structure.
645
+define('RSF_ELID_ENTRYID', 0x0001); // variable Indicates that the ElementData field contains the entry ID of the special folder
646 646
                                                            // that is of the type indicated by the value of the PersistID field of the PersistData structure.
647
-define('RSF_ELID_HEADER'                         ,0x0002); // 4 bytes Indicates that the ElementData field contains a 4-byte header value equal to 0x00000000.
648
-
649
-define('STGM_DIRECT'                             ,0x00000000);
650
-define('STGM_TRANSACTED'                         ,0x00010000);
651
-define('STGM_SIMPLE'                             ,0x08000000);
652
-define('STGM_READ'                               ,0x00000000);
653
-define('STGM_WRITE'                              ,0x00000001);
654
-define('STGM_READWRITE'                          ,0x00000002);
655
-define('STGM_SHARE_DENY_NONE'                    ,0x00000040);
656
-define('STGM_SHARE_DENY_READ'                    ,0x00000030);
657
-define('STGM_SHARE_DENY_WRITE'                   ,0x00000020);
658
-define('STGM_SHARE_EXCLUSIVE'                    ,0x00000010);
659
-define('STGM_PRIORITY'                           ,0x00040000);
660
-define('STGM_DELETEONRELEASE'                    ,0x04000000);
661
-define('STGM_NOSCRATCH'                          ,0x00100000);
662
-define('STGM_CREATE'                             ,0x00001000);
663
-define('STGM_CONVERT'                            ,0x00020000);
664
-define('STGM_FAILIFTHERE'                        ,0x00000000);
665
-define('STGM_NOSNAPSHOT'                         ,0x00200000);
666
-define('STGM_DIRECT_SWMR'                        ,0x00400000);
647
+define('RSF_ELID_HEADER', 0x0002); // 4 bytes Indicates that the ElementData field contains a 4-byte header value equal to 0x00000000.
648
+
649
+define('STGM_DIRECT', 0x00000000);
650
+define('STGM_TRANSACTED', 0x00010000);
651
+define('STGM_SIMPLE', 0x08000000);
652
+define('STGM_READ', 0x00000000);
653
+define('STGM_WRITE', 0x00000001);
654
+define('STGM_READWRITE', 0x00000002);
655
+define('STGM_SHARE_DENY_NONE', 0x00000040);
656
+define('STGM_SHARE_DENY_READ', 0x00000030);
657
+define('STGM_SHARE_DENY_WRITE', 0x00000020);
658
+define('STGM_SHARE_EXCLUSIVE', 0x00000010);
659
+define('STGM_PRIORITY', 0x00040000);
660
+define('STGM_DELETEONRELEASE', 0x04000000);
661
+define('STGM_NOSCRATCH', 0x00100000);
662
+define('STGM_CREATE', 0x00001000);
663
+define('STGM_CONVERT', 0x00020000);
664
+define('STGM_FAILIFTHERE', 0x00000000);
665
+define('STGM_NOSNAPSHOT', 0x00200000);
666
+define('STGM_DIRECT_SWMR', 0x00400000);
Please login to merge, or discard this patch.
mapi/mapi.util.php 3 patches
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -193,12 +193,12 @@  discard block
 block discarded – undo
193 193
 function getCalendarItems($store, $calendar, $viewstart, $viewend, $propsrequested){
194 194
     $result = array();
195 195
     $properties = getPropIdsFromStrings($store, Array( "duedate" => "PT_SYSTIME:PSETID_Appointment:0x820e",
196
-                                               "startdate" =>  "PT_SYSTIME:PSETID_Appointment:0x820d",
197
-                                               "enddate_recurring" => "PT_SYSTIME:PSETID_Appointment:0x8236",
198
-                                               "recurring" => "PT_BOOLEAN:PSETID_Appointment:0x8223",
199
-                                               "recurring_data" => "PT_BINARY:PSETID_Appointment:0x8216",
200
-                                               "timezone_data" => "PT_BINARY:PSETID_Appointment:0x8233",
201
-                                               "label" => "PT_LONG:PSETID_Appointment:0x8214"
196
+                                                "startdate" =>  "PT_SYSTIME:PSETID_Appointment:0x820d",
197
+                                                "enddate_recurring" => "PT_SYSTIME:PSETID_Appointment:0x8236",
198
+                                                "recurring" => "PT_BOOLEAN:PSETID_Appointment:0x8223",
199
+                                                "recurring_data" => "PT_BINARY:PSETID_Appointment:0x8216",
200
+                                                "timezone_data" => "PT_BINARY:PSETID_Appointment:0x8233",
201
+                                                "label" => "PT_LONG:PSETID_Appointment:0x8214"
202 202
                                                 ));
203 203
 
204 204
     // Create a restriction that will discard rows of appointments that are definitely not in our
@@ -209,32 +209,32 @@  discard block
 block discarded – undo
209 209
     $restriction =
210 210
         // OR
211 211
         Array(RES_OR,
212
-                 Array(
213
-                       Array(RES_AND,    // Normal items: itemEnd must be after viewStart, itemStart must be before viewEnd
214
-                             Array(
215
-                                   Array(RES_PROPERTY,
216
-                                         Array(RELOP => RELOP_GT,
217
-                                               ULPROPTAG => $properties["duedate"],
218
-                                               VALUE => $viewstart
219
-                                               )
220
-                                         ),
221
-                                   Array(RES_PROPERTY,
222
-                                         Array(RELOP => RELOP_LT,
223
-                                               ULPROPTAG => $properties["startdate"],
224
-                                               VALUE => $viewend
225
-                                               )
226
-                                         )
227
-                                   )
228
-                             ),
229
-                       // OR
230
-                       Array(RES_PROPERTY,
231
-                             Array(RELOP => RELOP_EQ,
232
-                                   ULPROPTAG => $properties["recurring"],
233
-                                   VALUE => true
234
-                                   )
235
-                             )
236
-                       ) // EXISTS OR
237
-                 );        // global OR
212
+                    Array(
213
+                        Array(RES_AND,    // Normal items: itemEnd must be after viewStart, itemStart must be before viewEnd
214
+                                Array(
215
+                                    Array(RES_PROPERTY,
216
+                                            Array(RELOP => RELOP_GT,
217
+                                                ULPROPTAG => $properties["duedate"],
218
+                                                VALUE => $viewstart
219
+                                                )
220
+                                            ),
221
+                                    Array(RES_PROPERTY,
222
+                                            Array(RELOP => RELOP_LT,
223
+                                                ULPROPTAG => $properties["startdate"],
224
+                                                VALUE => $viewend
225
+                                                )
226
+                                            )
227
+                                    )
228
+                                ),
229
+                        // OR
230
+                        Array(RES_PROPERTY,
231
+                                Array(RELOP => RELOP_EQ,
232
+                                    ULPROPTAG => $properties["recurring"],
233
+                                    VALUE => true
234
+                                    )
235
+                                )
236
+                        ) // EXISTS OR
237
+                    );        // global OR
238 238
 
239 239
     // Get requested properties, plus whatever we need
240 240
     $proplist = array(PR_ENTRYID, $properties["recurring"], $properties["recurring_data"], $properties["timezone_data"]);
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  */
24 24
 function makeGuid($guid)
25 25
 {
26
-    return pack("vvvv", hexdec(substr($guid, 5, 4)), hexdec(substr($guid, 1, 4)), hexdec(substr($guid, 10, 4)), hexdec(substr($guid, 15, 4))) . hex2bin(substr($guid, 20, 4)) . hex2bin(substr($guid, 25, 12));
26
+    return pack("vvvv", hexdec(substr($guid, 5, 4)), hexdec(substr($guid, 1, 4)), hexdec(substr($guid, 10, 4)), hexdec(substr($guid, 15, 4))).hex2bin(substr($guid, 20, 4)).hex2bin(substr($guid, 25, 12));
27 27
 }
28 28
 
29 29
 /**
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
  *@param int $errcode the MAPI error code, if not given, we use mapi_last_hresult
33 33
  *@return string The defined name for the MAPI error code
34 34
  */
35
-function get_mapi_error_name($errcode=null)
35
+function get_mapi_error_name($errcode = null)
36 36
 {
37
-    if ($errcode === null){
37
+    if ($errcode === null) {
38 38
         $errcode = mapi_last_hresult();
39 39
     }
40 40
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
              * we have to manually typecast value to integer, so float will be converted in integer,
49 49
              * but still its out of bound for integer limit so it will be auto adjusted to minus value
50 50
              */
51
-            if ($errcode == (int) $value) {
51
+            if ($errcode == (int)$value) {
52 52
                 // Check that we have an actual MAPI error or warning definition
53 53
                 $prefix = substr($key, 0, 7);
54 54
                 if ($prefix == "MAPI_E_" || $prefix == "MAPI_W_") {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     // error code not found, return hex value (this is a fix for 64-bit systems, we can't use the dechex() function for this)
64 64
     $result = unpack("H*", pack("N", $errcode));
65
-    return "0x" . $result[1];
65
+    return "0x".$result[1];
66 66
 }
67 67
 
68 68
 /**
@@ -82,28 +82,28 @@  discard block
 block discarded – undo
82 82
     // caching
83 83
     $guids = array();
84 84
 
85
-    foreach($mapping as $name=>$val){
86
-        if(is_string($val)) {
85
+    foreach ($mapping as $name=>$val) {
86
+        if (is_string($val)) {
87 87
             $split = explode(":", $val);
88 88
 
89
-            if(count($split) != 3){ // invalid string, ignore
90
-                trigger_error(sprintf("Invalid property: %s \"%s\"",$name,$val), E_USER_NOTICE);
89
+            if (count($split) != 3) { // invalid string, ignore
90
+                trigger_error(sprintf("Invalid property: %s \"%s\"", $name, $val), E_USER_NOTICE);
91 91
                 continue;
92 92
             }
93 93
 
94
-            if(substr($split[2], 0, 2) == "0x") {
94
+            if (substr($split[2], 0, 2) == "0x") {
95 95
                 $id = hexdec(substr($split[2], 2));
96 96
             } else {
97 97
                 $id = $split[2];
98 98
             }
99 99
 
100 100
             // have we used this guid before?
101
-            if (!defined($split[1])){
102
-                if (!array_key_exists($split[1], $guids)){
101
+            if (!defined($split[1])) {
102
+                if (!array_key_exists($split[1], $guids)) {
103 103
                     $guids[$split[1]] = makeguid($split[1]);
104 104
                 }
105 105
                 $guid = $guids[$split[1]];
106
-            }else{
106
+            } else {
107 107
                 $guid = constant($split[1]);
108 108
             }
109 109
 
@@ -113,19 +113,19 @@  discard block
 block discarded – undo
113 113
             $ids["guid"][$num] = $guid;
114 114
             $ids["type"][$num] = $split[0];
115 115
             $num++;
116
-        }else{
116
+        } else {
117 117
             // not a named property
118 118
             $props[$name] = $val;
119 119
         }
120 120
     }
121 121
 
122
-    if (empty($ids["id"])){
122
+    if (empty($ids["id"])) {
123 123
         return $props;
124 124
     }
125 125
 
126 126
     // get the ids
127 127
     $named = mapi_getidsfromnames($store, $ids["id"], $ids["guid"]);
128
-    foreach($named as $num=>$prop){
128
+    foreach ($named as $num=>$prop) {
129 129
         $props[$ids["name"][$num]] = mapi_prop_tag(constant($ids["type"][$num]), mapi_prop_id($prop));
130 130
     }
131 131
 
@@ -190,9 +190,9 @@  discard block
 block discarded – undo
190 190
  * @param $rows array Array of rowdata as if they were returned directly from mapi_table_queryrows. Each recurring item is
191 191
  *                    expanded so that it seems that there are only many single appointments in the table.
192 192
  */
193
-function getCalendarItems($store, $calendar, $viewstart, $viewend, $propsrequested){
193
+function getCalendarItems($store, $calendar, $viewstart, $viewend, $propsrequested) {
194 194
     $result = array();
195
-    $properties = getPropIdsFromStrings($store, Array( "duedate" => "PT_SYSTIME:PSETID_Appointment:0x820e",
195
+    $properties = getPropIdsFromStrings($store, Array("duedate" => "PT_SYSTIME:PSETID_Appointment:0x820e",
196 196
                                                "startdate" =>  "PT_SYSTIME:PSETID_Appointment:0x820d",
197 197
                                                "enddate_recurring" => "PT_SYSTIME:PSETID_Appointment:0x8236",
198 198
                                                "recurring" => "PT_BOOLEAN:PSETID_Appointment:0x8223",
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         // OR
211 211
         Array(RES_OR,
212 212
                  Array(
213
-                       Array(RES_AND,    // Normal items: itemEnd must be after viewStart, itemStart must be before viewEnd
213
+                       Array(RES_AND, // Normal items: itemEnd must be after viewStart, itemStart must be before viewEnd
214 214
                              Array(
215 215
                                    Array(RES_PROPERTY,
216 216
                                          Array(RELOP => RELOP_GT,
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                                    )
235 235
                              )
236 236
                        ) // EXISTS OR
237
-                 );        // global OR
237
+                 ); // global OR
238 238
 
239 239
     // Get requested properties, plus whatever we need
240 240
     $proplist = array(PR_ENTRYID, $properties["recurring"], $properties["recurring_data"], $properties["timezone_data"]);
@@ -244,16 +244,16 @@  discard block
 block discarded – undo
244 244
 
245 245
     // $rows now contains all the items that MAY be in the window; a recurring item needs expansion before including in the output.
246 246
 
247
-    foreach($rows as $row) {
247
+    foreach ($rows as $row) {
248 248
         $items = array();
249 249
 
250
-        if(isset($row[$properties["recurring"]]) && $row[$properties["recurring"]]) {
250
+        if (isset($row[$properties["recurring"]]) && $row[$properties["recurring"]]) {
251 251
             // Recurring item
252 252
             $rec = new Recurrence($store, $row);
253 253
 
254 254
             // GetItems guarantees that the item overlaps the interval <$viewstart, $viewend>
255 255
             $occurrences = $rec->getItems($viewstart, $viewend);
256
-            foreach($occurrences as $occurrence) {
256
+            foreach ($occurrences as $occurrence) {
257 257
                 // The occurrence takes all properties from the main row, but overrides some properties (like start and end obviously)
258 258
                 $item = $occurrence + $row;
259 259
                 array_push($items, $item);
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             array_push($items, $row);
265 265
         }
266 266
 
267
-        $result = array_merge($result,$items);
267
+        $result = array_merge($result, $items);
268 268
     }
269 269
 
270 270
     // All items are guaranteed to overlap the interval <$viewstart, $viewend>. Note that we may be returning a few extra
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
                     $guids[$split[1]] = makeguid($split[1]);
104 104
                 }
105 105
                 $guid = $guids[$split[1]];
106
-            }else{
106
+            } else{
107 107
                 $guid = constant($split[1]);
108 108
             }
109 109
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $ids["guid"][$num] = $guid;
114 114
             $ids["type"][$num] = $split[0];
115 115
             $num++;
116
-        }else{
116
+        } else{
117 117
             // not a named property
118 118
             $props[$name] = $val;
119 119
         }
Please login to merge, or discard this patch.
mapi/mapicode.php 1 patch
Spacing   +96 added lines, -96 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 //
16 16
 // Success codes
17 17
 //
18
-define('S_OK',               0x00000000);
19
-define('S_FALSE',            0x00000001);
20
-define('SEVERITY_ERROR',     1);
18
+define('S_OK', 0x00000000);
19
+define('S_FALSE', 0x00000001);
20
+define('SEVERITY_ERROR', 1);
21 21
 
22 22
 /* from winerror.h */
23 23
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 */
27 27
 function make_mapi_e($code)
28 28
 {
29
-    return (int) mapi_make_scode(1, $code);
29
+    return (int)mapi_make_scode(1, $code);
30 30
 }
31 31
 
32 32
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 */
36 36
 function make_mapi_s($code)
37 37
 {
38
-    return (int) mapi_make_scode(0, $code);
38
+    return (int)mapi_make_scode(0, $code);
39 39
 }
40 40
 
41 41
 /* From mapicode.h */
@@ -81,128 +81,128 @@  discard block
 block discarded – undo
81 81
  *      Code - is the facility's status code
82 82
  *
83 83
  */
84
-define('NOERROR'                                         ,0);
84
+define('NOERROR', 0);
85 85
 
86 86
 // The following codes don't use make_mapi_e because they are in the 0x000FF000 range,
87 87
 // but we cannot use the HEX value as would make most sense as that would break in 64bit PHP
88 88
 // (grommunio will return a negative value, but PHP would convert this define into a positive
89 89
 // value). Hence we declare the value exactly as we need it as integer and bypass the
90 90
 // 32bit/64bit hell.
91
-define('MAPI_E_CALL_FAILED'                              ,(int)-2147467259); // 0x80004005
92
-define('MAPI_E_NOT_ENOUGH_MEMORY'                        ,(int)-2147024882); // 0x8007000E
93
-define('MAPI_E_INVALID_PARAMETER'                        ,(int)-2147024809); // 0x80070057
94
-define('MAPI_E_INTERFACE_NOT_SUPPORTED'                  ,(int)-2147467262); // 0x80004002
95
-define('MAPI_E_NO_ACCESS'                                ,(int)-2147024891); // 0x80070005
96
-
97
-define('MAPI_E_NO_SUPPORT'                               ,make_mapi_e(0x102));
98
-define('MAPI_E_BAD_CHARWIDTH'                            ,make_mapi_e(0x103));
99
-define('MAPI_E_STRING_TOO_LONG'                          ,make_mapi_e(0x105));
100
-define('MAPI_E_UNKNOWN_FLAGS'                            ,make_mapi_e(0x106));
101
-define('MAPI_E_INVALID_ENTRYID'                          ,make_mapi_e(0x107));
102
-define('MAPI_E_INVALID_OBJECT'                           ,make_mapi_e(0x108));
103
-define('MAPI_E_OBJECT_CHANGED'                           ,make_mapi_e(0x109));
104
-define('MAPI_E_OBJECT_DELETED'                           ,make_mapi_e(0x10A));
105
-define('MAPI_E_BUSY'                                     ,make_mapi_e(0x10B));
106
-define('MAPI_E_NOT_ENOUGH_DISK'                          ,make_mapi_e(0x10D));
107
-define('MAPI_E_NOT_ENOUGH_RESOURCES'                     ,make_mapi_e(0x10E));
108
-define('MAPI_E_NOT_FOUND'                                ,make_mapi_e(0x10F));
109
-define('MAPI_E_VERSION'                                  ,make_mapi_e(0x110));
110
-define('MAPI_E_LOGON_FAILED'                             ,make_mapi_e(0x111));
111
-define('MAPI_E_SESSION_LIMIT'                            ,make_mapi_e(0x112));
112
-define('MAPI_E_USER_CANCEL'                              ,make_mapi_e(0x113));
113
-define('MAPI_E_UNABLE_TO_ABORT'                          ,make_mapi_e(0x114));
114
-define('MAPI_E_NETWORK_ERROR'                            ,make_mapi_e(0x115));
115
-define('MAPI_E_DISK_ERROR'                               ,make_mapi_e(0x116));
116
-define('MAPI_E_TOO_COMPLEX'                              ,make_mapi_e(0x117));
117
-define('MAPI_E_BAD_COLUMN'                               ,make_mapi_e(0x118));
118
-define('MAPI_E_EXTENDED_ERROR'                           ,make_mapi_e(0x119));
119
-define('MAPI_E_COMPUTED'                                 ,make_mapi_e(0x11A));
120
-define('MAPI_E_CORRUPT_DATA'                             ,make_mapi_e(0x11B));
121
-define('MAPI_E_UNCONFIGURED'                             ,make_mapi_e(0x11C));
122
-define('MAPI_E_FAILONEPROVIDER'                          ,make_mapi_e(0x11D));
123
-define('MAPI_E_UNKNOWN_CPID'                             ,make_mapi_e(0x11E));
124
-define('MAPI_E_UNKNOWN_LCID'                             ,make_mapi_e(0x11F));
91
+define('MAPI_E_CALL_FAILED', (int)-2147467259); // 0x80004005
92
+define('MAPI_E_NOT_ENOUGH_MEMORY', (int)-2147024882); // 0x8007000E
93
+define('MAPI_E_INVALID_PARAMETER', (int)-2147024809); // 0x80070057
94
+define('MAPI_E_INTERFACE_NOT_SUPPORTED', (int)-2147467262); // 0x80004002
95
+define('MAPI_E_NO_ACCESS', (int)-2147024891); // 0x80070005
96
+
97
+define('MAPI_E_NO_SUPPORT', make_mapi_e(0x102));
98
+define('MAPI_E_BAD_CHARWIDTH', make_mapi_e(0x103));
99
+define('MAPI_E_STRING_TOO_LONG', make_mapi_e(0x105));
100
+define('MAPI_E_UNKNOWN_FLAGS', make_mapi_e(0x106));
101
+define('MAPI_E_INVALID_ENTRYID', make_mapi_e(0x107));
102
+define('MAPI_E_INVALID_OBJECT', make_mapi_e(0x108));
103
+define('MAPI_E_OBJECT_CHANGED', make_mapi_e(0x109));
104
+define('MAPI_E_OBJECT_DELETED', make_mapi_e(0x10A));
105
+define('MAPI_E_BUSY', make_mapi_e(0x10B));
106
+define('MAPI_E_NOT_ENOUGH_DISK', make_mapi_e(0x10D));
107
+define('MAPI_E_NOT_ENOUGH_RESOURCES', make_mapi_e(0x10E));
108
+define('MAPI_E_NOT_FOUND', make_mapi_e(0x10F));
109
+define('MAPI_E_VERSION', make_mapi_e(0x110));
110
+define('MAPI_E_LOGON_FAILED', make_mapi_e(0x111));
111
+define('MAPI_E_SESSION_LIMIT', make_mapi_e(0x112));
112
+define('MAPI_E_USER_CANCEL', make_mapi_e(0x113));
113
+define('MAPI_E_UNABLE_TO_ABORT', make_mapi_e(0x114));
114
+define('MAPI_E_NETWORK_ERROR', make_mapi_e(0x115));
115
+define('MAPI_E_DISK_ERROR', make_mapi_e(0x116));
116
+define('MAPI_E_TOO_COMPLEX', make_mapi_e(0x117));
117
+define('MAPI_E_BAD_COLUMN', make_mapi_e(0x118));
118
+define('MAPI_E_EXTENDED_ERROR', make_mapi_e(0x119));
119
+define('MAPI_E_COMPUTED', make_mapi_e(0x11A));
120
+define('MAPI_E_CORRUPT_DATA', make_mapi_e(0x11B));
121
+define('MAPI_E_UNCONFIGURED', make_mapi_e(0x11C));
122
+define('MAPI_E_FAILONEPROVIDER', make_mapi_e(0x11D));
123
+define('MAPI_E_UNKNOWN_CPID', make_mapi_e(0x11E));
124
+define('MAPI_E_UNKNOWN_LCID', make_mapi_e(0x11F));
125 125
 
126 126
 /* Flavors of E_ACCESSDENIED, used at logon */
127 127
 
128
-define('MAPI_E_PASSWORD_CHANGE_REQUIRED'                 ,make_mapi_e(0x120));
129
-define('MAPI_E_PASSWORD_EXPIRED'                         ,make_mapi_e(0x121));
130
-define('MAPI_E_INVALID_WORKSTATION_ACCOUNT'              ,make_mapi_e(0x122));
131
-define('MAPI_E_INVALID_ACCESS_TIME'                      ,make_mapi_e(0x123));
132
-define('MAPI_E_ACCOUNT_DISABLED'                         ,make_mapi_e(0x124));
133
-define('MAPI_E_WEBAPP_FEATURE_DISABLED'                  ,make_mapi_e(0x125));
128
+define('MAPI_E_PASSWORD_CHANGE_REQUIRED', make_mapi_e(0x120));
129
+define('MAPI_E_PASSWORD_EXPIRED', make_mapi_e(0x121));
130
+define('MAPI_E_INVALID_WORKSTATION_ACCOUNT', make_mapi_e(0x122));
131
+define('MAPI_E_INVALID_ACCESS_TIME', make_mapi_e(0x123));
132
+define('MAPI_E_ACCOUNT_DISABLED', make_mapi_e(0x124));
133
+define('MAPI_E_WEBAPP_FEATURE_DISABLED', make_mapi_e(0x125));
134 134
 
135 135
 /* MAPI base function and status object specific errors and warnings */
136 136
 
137
-define('MAPI_E_END_OF_SESSION'                           ,make_mapi_e(0x200));
138
-define('MAPI_E_UNKNOWN_ENTRYID'                          ,make_mapi_e(0x201));
139
-define('MAPI_E_MISSING_REQUIRED_COLUMN'                  ,make_mapi_e(0x202));
140
-define('MAPI_W_NO_SERVICE'                               ,make_mapi_s(0x203));
137
+define('MAPI_E_END_OF_SESSION', make_mapi_e(0x200));
138
+define('MAPI_E_UNKNOWN_ENTRYID', make_mapi_e(0x201));
139
+define('MAPI_E_MISSING_REQUIRED_COLUMN', make_mapi_e(0x202));
140
+define('MAPI_W_NO_SERVICE', make_mapi_s(0x203));
141 141
 
142 142
 /* Property specific errors and warnings */
143 143
 
144
-define('MAPI_E_BAD_VALUE'                                ,make_mapi_e(0x301));
145
-define('MAPI_E_INVALID_TYPE'                             ,make_mapi_e(0x302));
146
-define('MAPI_E_TYPE_NO_SUPPORT'                          ,make_mapi_e(0x303));
147
-define('MAPI_E_UNEXPECTED_TYPE'                          ,make_mapi_e(0x304));
148
-define('MAPI_E_TOO_BIG'                                  ,make_mapi_e(0x305));
149
-define('MAPI_E_DECLINE_COPY'                             ,make_mapi_e(0x306));
150
-define('MAPI_E_UNEXPECTED_ID'                            ,make_mapi_e(0x307));
144
+define('MAPI_E_BAD_VALUE', make_mapi_e(0x301));
145
+define('MAPI_E_INVALID_TYPE', make_mapi_e(0x302));
146
+define('MAPI_E_TYPE_NO_SUPPORT', make_mapi_e(0x303));
147
+define('MAPI_E_UNEXPECTED_TYPE', make_mapi_e(0x304));
148
+define('MAPI_E_TOO_BIG', make_mapi_e(0x305));
149
+define('MAPI_E_DECLINE_COPY', make_mapi_e(0x306));
150
+define('MAPI_E_UNEXPECTED_ID', make_mapi_e(0x307));
151 151
 
152
-define('MAPI_W_ERRORS_RETURNED'                          ,make_mapi_s(0x380));
152
+define('MAPI_W_ERRORS_RETURNED', make_mapi_s(0x380));
153 153
 
154 154
 /* Table specific errors and warnings */
155 155
 
156
-define('MAPI_E_UNABLE_TO_COMPLETE'                       ,make_mapi_e(0x400));
157
-define('MAPI_E_TIMEOUT'                                  ,make_mapi_e(0x401));
158
-define('MAPI_E_TABLE_EMPTY'                              ,make_mapi_e(0x402));
159
-define('MAPI_E_TABLE_TOO_BIG'                            ,make_mapi_e(0x403));
156
+define('MAPI_E_UNABLE_TO_COMPLETE', make_mapi_e(0x400));
157
+define('MAPI_E_TIMEOUT', make_mapi_e(0x401));
158
+define('MAPI_E_TABLE_EMPTY', make_mapi_e(0x402));
159
+define('MAPI_E_TABLE_TOO_BIG', make_mapi_e(0x403));
160 160
 
161
-define('MAPI_E_INVALID_BOOKMARK'                         ,make_mapi_e(0x405));
161
+define('MAPI_E_INVALID_BOOKMARK', make_mapi_e(0x405));
162 162
 
163
-define('MAPI_W_POSITION_CHANGED'                         ,make_mapi_s(0x481));
164
-define('MAPI_W_APPROX_COUNT'                             ,make_mapi_s(0x482));
163
+define('MAPI_W_POSITION_CHANGED', make_mapi_s(0x481));
164
+define('MAPI_W_APPROX_COUNT', make_mapi_s(0x482));
165 165
 
166 166
 /* Transport specific errors and warnings */
167 167
 
168
-define('MAPI_E_WAIT'                                     ,make_mapi_e(0x500));
169
-define('MAPI_E_CANCEL'                                   ,make_mapi_e(0x501));
170
-define('MAPI_E_NOT_ME'                                   ,make_mapi_e(0x502));
168
+define('MAPI_E_WAIT', make_mapi_e(0x500));
169
+define('MAPI_E_CANCEL', make_mapi_e(0x501));
170
+define('MAPI_E_NOT_ME', make_mapi_e(0x502));
171 171
 
172
-define('MAPI_W_CANCEL_MESSAGE'                           ,make_mapi_s(0x580));
172
+define('MAPI_W_CANCEL_MESSAGE', make_mapi_s(0x580));
173 173
 
174 174
 /* Message Store, Folder, and Message specific errors and warnings */
175 175
 
176
-define('MAPI_E_CORRUPT_STORE'                            ,make_mapi_e(0x600));
177
-define('MAPI_E_NOT_IN_QUEUE'                             ,make_mapi_e(0x601));
178
-define('MAPI_E_NO_SUPPRESS'                              ,make_mapi_e(0x602));
179
-define('MAPI_E_COLLISION'                                ,make_mapi_e(0x604));
180
-define('MAPI_E_NOT_INITIALIZED'                          ,make_mapi_e(0x605));
181
-define('MAPI_E_NON_STANDARD'                             ,make_mapi_e(0x606));
182
-define('MAPI_E_NO_RECIPIENTS'                            ,make_mapi_e(0x607));
183
-define('MAPI_E_SUBMITTED'                                ,make_mapi_e(0x608));
184
-define('MAPI_E_HAS_FOLDERS'                              ,make_mapi_e(0x609));
185
-define('MAPI_E_HAS_MESSAGES'                             ,make_mapi_e(0x60A));
186
-define('MAPI_E_FOLDER_CYCLE'                             ,make_mapi_e(0x60B));
187
-define('MAPI_E_STORE_FULL'                               ,make_mapi_e(0x60C));
188
-
189
-define('MAPI_W_PARTIAL_COMPLETION'                       ,make_mapi_s(0x680));
176
+define('MAPI_E_CORRUPT_STORE', make_mapi_e(0x600));
177
+define('MAPI_E_NOT_IN_QUEUE', make_mapi_e(0x601));
178
+define('MAPI_E_NO_SUPPRESS', make_mapi_e(0x602));
179
+define('MAPI_E_COLLISION', make_mapi_e(0x604));
180
+define('MAPI_E_NOT_INITIALIZED', make_mapi_e(0x605));
181
+define('MAPI_E_NON_STANDARD', make_mapi_e(0x606));
182
+define('MAPI_E_NO_RECIPIENTS', make_mapi_e(0x607));
183
+define('MAPI_E_SUBMITTED', make_mapi_e(0x608));
184
+define('MAPI_E_HAS_FOLDERS', make_mapi_e(0x609));
185
+define('MAPI_E_HAS_MESSAGES', make_mapi_e(0x60A));
186
+define('MAPI_E_FOLDER_CYCLE', make_mapi_e(0x60B));
187
+define('MAPI_E_STORE_FULL', make_mapi_e(0x60C));
188
+
189
+define('MAPI_W_PARTIAL_COMPLETION', make_mapi_s(0x680));
190 190
 
191 191
 /* Address Book specific errors and warnings */
192 192
 
193
-define('MAPI_E_AMBIGUOUS_RECIP'                          ,make_mapi_e(0x700));
193
+define('MAPI_E_AMBIGUOUS_RECIP', make_mapi_e(0x700));
194 194
 
195 195
 /* ICS errors and warnings */
196 196
 
197
-define('SYNC_E_UNKNOWN_FLAGS',                            MAPI_E_UNKNOWN_FLAGS);
198
-define('SYNC_E_INVALID_PARAMETER',                        MAPI_E_INVALID_PARAMETER);
199
-define('SYNC_E_ERROR',                                    MAPI_E_CALL_FAILED);
200
-define('SYNC_E_OBJECT_DELETED',                           make_mapi_e(0x800));
201
-define('SYNC_E_IGNORE',                                   make_mapi_e(0x801));
202
-define('SYNC_E_CONFLICT',                                 make_mapi_e(0x802));
203
-define('SYNC_E_NO_PARENT',                                make_mapi_e(0x803));
204
-define('SYNC_E_INCEST',                                   make_mapi_e(0x804));
205
-define('SYNC_E_UNSYNCHRONIZED',                           make_mapi_e(0x805));
206
-
207
-define('SYNC_W_PROGRESS',                                 make_mapi_s(0x820));
208
-define('SYNC_W_CLIENT_CHANGE_NEWER',                      make_mapi_s(0x821));
197
+define('SYNC_E_UNKNOWN_FLAGS', MAPI_E_UNKNOWN_FLAGS);
198
+define('SYNC_E_INVALID_PARAMETER', MAPI_E_INVALID_PARAMETER);
199
+define('SYNC_E_ERROR', MAPI_E_CALL_FAILED);
200
+define('SYNC_E_OBJECT_DELETED', make_mapi_e(0x800));
201
+define('SYNC_E_IGNORE', make_mapi_e(0x801));
202
+define('SYNC_E_CONFLICT', make_mapi_e(0x802));
203
+define('SYNC_E_NO_PARENT', make_mapi_e(0x803));
204
+define('SYNC_E_INCEST', make_mapi_e(0x804));
205
+define('SYNC_E_UNSYNCHRONIZED', make_mapi_e(0x805));
206
+
207
+define('SYNC_W_PROGRESS', make_mapi_s(0x820));
208
+define('SYNC_W_CLIENT_CHANGE_NEWER', make_mapi_s(0x821));
Please login to merge, or discard this patch.
mapi/class.meetingrequest.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
      * @param string $newProposedStartTime contains starttime if user has proposed other time
612 612
      * @param string $newProposedEndTime contains endtime if user has proposed other time
613 613
      * @param string $basedate start of day of occurrence for which user has accepted the recurrent meeting
614
-	 * @param boolean $isImported true to indicate that MR is imported from .ics or .vcs file else it false.
614
+     * @param boolean $isImported true to indicate that MR is imported from .ics or .vcs file else it false.
615 615
      * @return string $entryid entryid of item which created/updated in calendar
616 616
      */
617 617
     function doAccept($tentative, $sendresponse, $move, $newProposedStartTime=false, $newProposedEndTime=false, $body=false, $userAction = false, $store=false, $basedate = false, $isImported = false)
@@ -1841,7 +1841,7 @@  discard block
 block discarded – undo
1841 1841
 
1842 1842
     /**
1843 1843
      * Function will resolve the user and open its store
1844
-	 * @param String $ownerentryid the entryid of the user
1844
+     * @param String $ownerentryid the entryid of the user
1845 1845
      * @return MAPIStore store of the user
1846 1846
      */
1847 1847
     function openCustomUserStore($ownerentryid)
@@ -3752,7 +3752,7 @@  discard block
 block discarded – undo
3752 3752
         }
3753 3753
 
3754 3754
         return $localCategories;
3755
-	}
3755
+    }
3756 3756
 
3757 3757
     /**
3758 3758
      * Helper function which is use to apply local categories on respective occurrences.
Please login to merge, or discard this patch.
Spacing   +258 added lines, -258 removed lines patch added patch discarded remove patch
@@ -150,15 +150,15 @@  discard block
 block discarded – undo
150 150
         $properties['reminderminutes'] = 'PT_LONG:PSETID_Common:0x8501';
151 151
         $properties['reminderset'] = 'PT_BOOLEAN:PSETID_Common:0x8503';
152 152
         $properties['sendasical'] = 'PT_BOOLEAN:PSETID_Appointment:0x8200';
153
-        $properties['updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8201';                    // AppointmentSequenceNumber
154
-        $properties['last_updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8203';            // AppointmentLastSequence
153
+        $properties['updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8201'; // AppointmentSequenceNumber
154
+        $properties['last_updatecounter'] = 'PT_LONG:PSETID_Appointment:0x8203'; // AppointmentLastSequence
155 155
         $properties['unknown7'] = 'PT_LONG:PSETID_Appointment:0x8202';
156 156
         $properties['busystatus'] = 'PT_LONG:PSETID_Appointment:0x8205';
157 157
         $properties['intendedbusystatus'] = 'PT_LONG:PSETID_Appointment:0x8224';
158 158
         $properties['start'] = 'PT_SYSTIME:PSETID_Appointment:0x820d';
159 159
         $properties['responselocation'] = 'PT_STRING8:PSETID_Meeting:0x2';
160 160
         $properties['location'] = 'PT_STRING8:PSETID_Appointment:0x8208';
161
-        $properties['requestsent'] = 'PT_BOOLEAN:PSETID_Appointment:0x8229';        // PidLidFInvited, MeetingRequestWasSent
161
+        $properties['requestsent'] = 'PT_BOOLEAN:PSETID_Appointment:0x8229'; // PidLidFInvited, MeetingRequestWasSent
162 162
         $properties['startdate'] = 'PT_SYSTIME:PSETID_Appointment:0x820d';
163 163
         $properties['duedate'] = 'PT_SYSTIME:PSETID_Appointment:0x820e';
164 164
         $properties['flagdueby'] = 'PT_SYSTIME:PSETID_Common:0x8560';
@@ -167,11 +167,11 @@  discard block
 block discarded – undo
167 167
         $properties['recurring'] = 'PT_BOOLEAN:PSETID_Appointment:0x8223';
168 168
         $properties['clipstart'] = 'PT_SYSTIME:PSETID_Appointment:0x8235';
169 169
         $properties['clipend'] = 'PT_SYSTIME:PSETID_Appointment:0x8236';
170
-        $properties['start_recur_date'] = 'PT_LONG:PSETID_Meeting:0xD';                // StartRecurTime
171
-        $properties['start_recur_time'] = 'PT_LONG:PSETID_Meeting:0xE';                // StartRecurTime
172
-        $properties['end_recur_date'] = 'PT_LONG:PSETID_Meeting:0xF';                // EndRecurDate
173
-        $properties['end_recur_time'] = 'PT_LONG:PSETID_Meeting:0x10';                // EndRecurTime
174
-        $properties['is_exception'] = 'PT_BOOLEAN:PSETID_Meeting:0xA';                // LID_IS_EXCEPTION
170
+        $properties['start_recur_date'] = 'PT_LONG:PSETID_Meeting:0xD'; // StartRecurTime
171
+        $properties['start_recur_time'] = 'PT_LONG:PSETID_Meeting:0xE'; // StartRecurTime
172
+        $properties['end_recur_date'] = 'PT_LONG:PSETID_Meeting:0xF'; // EndRecurDate
173
+        $properties['end_recur_time'] = 'PT_LONG:PSETID_Meeting:0x10'; // EndRecurTime
174
+        $properties['is_exception'] = 'PT_BOOLEAN:PSETID_Meeting:0xA'; // LID_IS_EXCEPTION
175 175
         $properties['apptreplyname'] = 'PT_STRING8:PSETID_Appointment:0x8230';
176 176
         // Propose new time properties
177 177
         $properties['proposed_start_whole'] = 'PT_SYSTIME:PSETID_Appointment:0x8250';
@@ -209,12 +209,12 @@  discard block
 block discarded – undo
209 209
      */
210 210
     function isMeetingRequest($messageClass = false)
211 211
     {
212
-        if($messageClass === false) {
212
+        if ($messageClass === false) {
213 213
             $props = mapi_getprops($this->message, Array(PR_MESSAGE_CLASS));
214 214
             $messageClass = isset($props[PR_MESSAGE_CLASS]) ? $props[PR_MESSAGE_CLASS] : false;
215 215
         }
216 216
 
217
-        if($messageClass !== false &&  stripos($messageClass, 'ipm.schedule.meeting.request') === 0) {
217
+        if ($messageClass !== false && stripos($messageClass, 'ipm.schedule.meeting.request') === 0) {
218 218
             return true;
219 219
         }
220 220
 
@@ -228,12 +228,12 @@  discard block
 block discarded – undo
228 228
      */
229 229
     function isMeetingRequestResponse($messageClass = false)
230 230
     {
231
-        if($messageClass === false) {
231
+        if ($messageClass === false) {
232 232
             $props = mapi_getprops($this->message, Array(PR_MESSAGE_CLASS));
233 233
             $messageClass = isset($props[PR_MESSAGE_CLASS]) ? $props[PR_MESSAGE_CLASS] : false;
234 234
         }
235 235
 
236
-        if($messageClass !== false && stripos($messageClass, 'ipm.schedule.meeting.resp') === 0) {
236
+        if ($messageClass !== false && stripos($messageClass, 'ipm.schedule.meeting.resp') === 0) {
237 237
             return true;
238 238
         }
239 239
 
@@ -247,12 +247,12 @@  discard block
 block discarded – undo
247 247
      */
248 248
     function isMeetingCancellation($messageClass = false)
249 249
     {
250
-        if($messageClass === false) {
250
+        if ($messageClass === false) {
251 251
             $props = mapi_getprops($this->message, Array(PR_MESSAGE_CLASS));
252 252
             $messageClass = isset($props[PR_MESSAGE_CLASS]) ? $props[PR_MESSAGE_CLASS] : false;
253 253
         }
254 254
 
255
-        if($messageClass !== false && stripos($messageClass, 'ipm.schedule.meeting.canceled') === 0) {
255
+        if ($messageClass !== false && stripos($messageClass, 'ipm.schedule.meeting.canceled') === 0) {
256 256
             return true;
257 257
         }
258 258
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
     function getLastUpdateCounter()
267 267
     {
268 268
         $calendarItemProps = mapi_getprops($this->message, array($this->proptags['last_updatecounter']));
269
-        if(isset($calendarItemProps) && !empty($calendarItemProps)){
269
+        if (isset($calendarItemProps) && !empty($calendarItemProps)) {
270 270
             return $calendarItemProps[$this->proptags['last_updatecounter']];
271 271
         }
272 272
         return false;
@@ -278,10 +278,10 @@  discard block
 block discarded – undo
278 278
      */
279 279
     function processMeetingRequestResponse()
280 280
     {
281
-        if(!$this->isMeetingRequestResponse())
281
+        if (!$this->isMeetingRequestResponse())
282 282
             return;
283 283
 
284
-        if(!$this->isLocalOrganiser())
284
+        if (!$this->isLocalOrganiser())
285 285
             return;
286 286
 
287 287
         // Get information we need from the response message
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 
307 307
         $goid2 = $messageprops[$this->proptags['goid2']];
308 308
 
309
-        if(!isset($goid2) || !isset($messageprops[PR_SENT_REPRESENTING_EMAIL_ADDRESS])) {
309
+        if (!isset($goid2) || !isset($messageprops[PR_SENT_REPRESENTING_EMAIL_ADDRESS])) {
310 310
             return;
311 311
         }
312 312
 
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
         }
326 326
 
327 327
         // check for calendar access
328
-        if($this->checkCalendarWriteAccess($userStore) !== true) {
328
+        if ($this->checkCalendarWriteAccess($userStore) !== true) {
329 329
             // Throw an exception that we don't have write permissions on calendar folder,
330 330
             // allow caller to fill the error message
331 331
             throw new MAPIException(null, MAPI_E_NO_ACCESS);
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
         $calendarItemProps = mapi_getprops($calendarItem, array($this->proptags['recurring'], PR_STORE_ENTRYID, PR_PARENT_ENTRYID, PR_ENTRYID, $this->proptags['updatecounter']));
360 360
 
361 361
         // check if meeting response is already processed
362
-        if(isset($messageprops[PR_PROCESSED]) && $messageprops[PR_PROCESSED] == true) {
362
+        if (isset($messageprops[PR_PROCESSED]) && $messageprops[PR_PROCESSED] == true) {
363 363
             // meeting is already processed
364 364
             return;
365 365
         } else {
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 
370 370
         // if meeting is updated in organizer's calendar then we don't need to process
371 371
         // old response
372
-        if($this->isMeetingUpdated($basedate)) {
372
+        if ($this->isMeetingUpdated($basedate)) {
373 373
             return;
374 374
         }
375 375
 
@@ -387,11 +387,11 @@  discard block
 block discarded – undo
387 387
                                             ));
388 388
 
389 389
             // Create/modify exception
390
-            if($recurr->isException($basedate)) {
390
+            if ($recurr->isException($basedate)) {
391 391
                 $recurr->modifyException($exception_props, $basedate);
392 392
             } else {
393 393
                 // When we are creating an exception we need copy recipients from main recurring item
394
-                $recipTable =  mapi_message_getrecipienttable($calendarItem);
394
+                $recipTable = mapi_message_getrecipienttable($calendarItem);
395 395
                 $recips = mapi_table_queryallrows($recipTable, $this->recipprops);
396 396
 
397 397
                 // Retrieve actual start/due dates from calendar item.
@@ -423,9 +423,9 @@  discard block
 block discarded – undo
423 423
 
424 424
         $totalrecips = 0;
425 425
         $acceptedrecips = 0;
426
-        foreach($recipients as $recipient) {
426
+        foreach ($recipients as $recipient) {
427 427
             $totalrecips++;
428
-            if(isset($recipient[PR_ENTRYID]) && $this->compareABEntryIDs($recipient[PR_ENTRYID], $senderentryid)) {
428
+            if (isset($recipient[PR_ENTRYID]) && $this->compareABEntryIDs($recipient[PR_ENTRYID], $senderentryid)) {
429 429
                 $found = true;
430 430
 
431 431
                 /**
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
                 $recipient[PR_RECIPIENT_TRACKSTATUS_TIME] = $messageprops[$this->proptags['attendee_critical_change']];
442 442
 
443 443
                 // If this is a counter proposal, set the proposal properties in the recipient row
444
-                if(isset($messageprops[$this->proptags['counter_proposal']]) && $messageprops[$this->proptags['counter_proposal']]){
444
+                if (isset($messageprops[$this->proptags['counter_proposal']]) && $messageprops[$this->proptags['counter_proposal']]) {
445 445
                     $recipient[PR_PROPOSENEWTIME_START] = $messageprops[$this->proptags['proposed_start_whole']];
446 446
                     $recipient[PR_PROPOSENEWTIME_END] = $messageprops[$this->proptags['proposed_end_whole']];
447 447
                     $recipient[PR_PROPOSEDNEWTIME] = $messageprops[$this->proptags['counter_proposal']];
@@ -449,13 +449,13 @@  discard block
 block discarded – undo
449 449
 
450 450
                 mapi_message_modifyrecipients($calendarItem, MODRECIP_MODIFY, Array($recipient));
451 451
             }
452
-            if(isset($recipient[PR_RECIPIENT_TRACKSTATUS]) && $recipient[PR_RECIPIENT_TRACKSTATUS] == olRecipientTrackStatusAccepted)
452
+            if (isset($recipient[PR_RECIPIENT_TRACKSTATUS]) && $recipient[PR_RECIPIENT_TRACKSTATUS] == olRecipientTrackStatusAccepted)
453 453
                 $acceptedrecips++;
454 454
         }
455 455
 
456 456
         // If the recipient was not found in the original calendar item,
457 457
         // then add the recpient as a new optional recipient
458
-        if(!$found) {
458
+        if (!$found) {
459 459
             $recipient = Array();
460 460
             $recipient[PR_ENTRYID] = $messageprops[PR_SENT_REPRESENTING_ENTRYID];
461 461
             $recipient[PR_EMAIL_ADDRESS] = $messageprops[PR_SENT_REPRESENTING_EMAIL_ADDRESS];
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
             $recipient[PR_RECIPIENT_TRACKSTATUS_TIME] = $deliverytime;
468 468
 
469 469
             // If this is a counter proposal, set the proposal properties in the recipient row
470
-            if(isset($messageprops[$this->proptags['counter_proposal']])){
470
+            if (isset($messageprops[$this->proptags['counter_proposal']])) {
471 471
                 $recipient[PR_PROPOSENEWTIME_START] = $messageprops[$this->proptags['proposed_start_whole']];
472 472
                 $recipient[PR_PROPOSENEWTIME_END] = $messageprops[$this->proptags['proposed_end_whole']];
473 473
                 $recipient[PR_PROPOSEDNEWTIME] = $messageprops[$this->proptags['counter_proposal']];
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 
476 476
             mapi_message_modifyrecipients($calendarItem, MODRECIP_ADD, Array($recipient));
477 477
             $totalrecips++;
478
-            if($recipient[PR_RECIPIENT_TRACKSTATUS] == olRecipientTrackStatusAccepted) {
478
+            if ($recipient[PR_RECIPIENT_TRACKSTATUS] == olRecipientTrackStatusAccepted) {
479 479
                 $acceptedrecips++;
480 480
             }
481 481
         }
@@ -485,11 +485,11 @@  discard block
 block discarded – undo
485 485
 If it is the first time this attendee has proposed a new date/time, increment the value of the PidLidAppointmentProposalNumber property on the organizer's meeting object, by 0x00000001. If this property did not previously exist on the organizer's meeting object, it MUST be set with a value of 0x00000001.
486 486
 */
487 487
         // If this is a counter proposal, set the counter proposal indicator boolean
488
-        if(isset($messageprops[$this->proptags['counter_proposal']])){
488
+        if (isset($messageprops[$this->proptags['counter_proposal']])) {
489 489
             $props = Array();
490
-            if($messageprops[$this->proptags['counter_proposal']]){
490
+            if ($messageprops[$this->proptags['counter_proposal']]) {
491 491
                 $props[$this->proptags['counter_proposal']] = true;
492
-            }else{
492
+            } else {
493 493
                 $props[$this->proptags['counter_proposal']] = false;
494 494
             }
495 495
 
@@ -509,15 +509,15 @@  discard block
 block discarded – undo
509 509
      */
510 510
     function processMeetingCancellation()
511 511
     {
512
-        if(!$this->isMeetingCancellation()) {
512
+        if (!$this->isMeetingCancellation()) {
513 513
             return;
514 514
         }
515 515
 
516
-        if($this->isLocalOrganiser()) {
516
+        if ($this->isLocalOrganiser()) {
517 517
             return;
518 518
         }
519 519
 
520
-        if(!$this->isInCalendar()) {
520
+        if (!$this->isInCalendar()) {
521 521
             return;
522 522
         }
523 523
 
@@ -535,13 +535,13 @@  discard block
 block discarded – undo
535 535
         $listProperties['rcvd_representing_search_key'] = PR_RCVD_REPRESENTING_SEARCH_KEY;
536 536
         $messageProps = mapi_getprops($this->message, $listProperties);
537 537
 
538
-        $goid = $messageProps[$this->proptags['goid']];    //GlobalID (0x3)
539
-        if(!isset($goid)) {
538
+        $goid = $messageProps[$this->proptags['goid']]; //GlobalID (0x3)
539
+        if (!isset($goid)) {
540 540
             return;
541 541
         }
542 542
 
543 543
         // get delegator store, if delegate is processing this cancellation
544
-        if (isset($messageProps[PR_RCVD_REPRESENTING_ENTRYID])){
544
+        if (isset($messageProps[PR_RCVD_REPRESENTING_ENTRYID])) {
545 545
             $delegatorStore = $this->getDelegatorStore($messageProps[PR_RCVD_REPRESENTING_ENTRYID], array(PR_IPM_APPOINTMENT_ENTRYID));
546 546
 
547 547
             $store = $delegatorStore['store'];
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
         }
553 553
 
554 554
         // check for calendar access
555
-        if($this->checkCalendarWriteAccess($store) !== true) {
555
+        if ($this->checkCalendarWriteAccess($store) !== true) {
556 556
             // Throw an exception that we don't have write permissions on calendar folder,
557 557
             // allow caller to fill the error message
558 558
             throw new MAPIException(null, MAPI_E_NO_ACCESS);
@@ -561,18 +561,18 @@  discard block
 block discarded – undo
561 561
         $calendarItem = $this->getCorrespondentCalendarItem(true);
562 562
         $basedate = $this->getBasedateFromGlobalID($goid);
563 563
 
564
-        if($calendarItem !== false) {
564
+        if ($calendarItem !== false) {
565 565
             // if basedate is provided and we could not find the item then it could be that we are processing
566 566
             // an exception so get the exception and process it
567
-            if($basedate) {
567
+            if ($basedate) {
568 568
                 $calendarItemProps = mapi_getprops($calendarItem, array($this->proptags['recurring']));
569
-                if ($calendarItemProps[$this->proptags['recurring']] === true){
569
+                if ($calendarItemProps[$this->proptags['recurring']] === true) {
570 570
                     $recurr = new Recurrence($store, $calendarItem);
571 571
 
572 572
                     // Set message class
573 573
                     $messageProps[PR_MESSAGE_CLASS] = 'IPM.Appointment';
574 574
 
575
-                    if($recurr->isException($basedate)) {
575
+                    if ($recurr->isException($basedate)) {
576 576
                         $recurr->modifyException($messageProps, $basedate);
577 577
                     } else {
578 578
                         $recurr->createException($messageProps, $basedate);
@@ -614,9 +614,9 @@  discard block
 block discarded – undo
614 614
 	 * @param boolean $isImported true to indicate that MR is imported from .ics or .vcs file else it false.
615 615
      * @return string $entryid entryid of item which created/updated in calendar
616 616
      */
617
-    function doAccept($tentative, $sendresponse, $move, $newProposedStartTime=false, $newProposedEndTime=false, $body=false, $userAction = false, $store=false, $basedate = false, $isImported = false)
617
+    function doAccept($tentative, $sendresponse, $move, $newProposedStartTime = false, $newProposedEndTime = false, $body = false, $userAction = false, $store = false, $basedate = false, $isImported = false)
618 618
     {
619
-        if($this->isLocalOrganiser()) {
619
+        if ($this->isLocalOrganiser()) {
620 620
             return false;
621 621
         }
622 622
 
@@ -635,14 +635,14 @@  discard block
 block discarded – undo
635 635
         }
636 636
 
637 637
         // check for calendar access
638
-        if($this->checkCalendarWriteAccess($store) !== true) {
638
+        if ($this->checkCalendarWriteAccess($store) !== true) {
639 639
             // Throw an exception that we don't have write permissions on calendar folder,
640 640
             // allow caller to fill the error message
641 641
             throw new MAPIException(null, MAPI_E_NO_ACCESS);
642 642
         }
643 643
 
644 644
         // if meeting is out dated then don't process it
645
-        if($this->isMeetingRequest($messageprops[PR_MESSAGE_CLASS]) && $this->isMeetingOutOfDate()) {
645
+        if ($this->isMeetingRequest($messageprops[PR_MESSAGE_CLASS]) && $this->isMeetingOutOfDate()) {
646 646
             return false;
647 647
         }
648 648
 
@@ -653,8 +653,8 @@  discard block
 block discarded – undo
653 653
                 recipient's calendar
654 654
          *    2) after this every subsequent request to open meeting request will not do any processing
655 655
          */
656
-        if($this->isMeetingRequest($messageprops[PR_MESSAGE_CLASS]) && $userAction == false) {
657
-            if(isset($messageprops[PR_PROCESSED]) && $messageprops[PR_PROCESSED] == true) {
656
+        if ($this->isMeetingRequest($messageprops[PR_MESSAGE_CLASS]) && $userAction == false) {
657
+            if (isset($messageprops[PR_PROCESSED]) && $messageprops[PR_PROCESSED] == true) {
658 658
                 // if meeting request is already processed then don't do anything
659 659
                 return false;
660 660
             }
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
             // if correspondent calendar item is already processed then don't do anything
663 663
             $calendarItem = $this->getCorrespondentCalendarItem();
664 664
             $calendarItemProps = mapi_getprops($calendarItem, array(PR_PROCESSED));
665
-            if(isset($calendarItemProps[PR_PROCESSED]) && $calendarItemProps[PR_PROCESSED] == true) {
665
+            if (isset($calendarItemProps[PR_PROCESSED]) && $calendarItemProps[PR_PROCESSED] == true) {
666 666
                 // mark meeting-request mail as processed as well
667 667
                 mapi_setprops($this->message, Array(PR_PROCESSED => true));
668 668
                 mapi_savechanges($this->message);
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
 
679 679
         // set counter proposal properties in calendar item when proposing new time
680 680
         $proposeNewTimeProps = array();
681
-        if($newProposedStartTime && $newProposedEndTime) {
681
+        if ($newProposedStartTime && $newProposedEndTime) {
682 682
             $proposeNewTimeProps[$this->proptags['proposed_start_whole']] = $newProposedStartTime;
683 683
             $proposeNewTimeProps[$this->proptags['proposed_end_whole']] = $newProposedEndTime;
684 684
             $proposeNewTimeProps[$this->proptags['proposed_duration']] = round($newProposedEndTime - $newProposedStartTime) / 60;
@@ -688,15 +688,15 @@  discard block
 block discarded – undo
688 688
         // While sender is receiver then we have to process the meeting request as per the intended busy status
689 689
         // instead of tentative, and accept the same as per the intended busystatus.
690 690
         $senderEntryId = isset($messageprops[PR_SENT_REPRESENTING_ENTRYID]) ? $messageprops[PR_SENT_REPRESENTING_ENTRYID] : $messageprops[PR_SENDER_ENTRYID];
691
-        if(isset($messageprops[PR_RECEIVED_BY_ENTRYID]) && MAPIUtils::CompareEntryIds($senderEntryId, $messageprops[PR_RECEIVED_BY_ENTRYID])) {
691
+        if (isset($messageprops[PR_RECEIVED_BY_ENTRYID]) && MAPIUtils::CompareEntryIds($senderEntryId, $messageprops[PR_RECEIVED_BY_ENTRYID])) {
692 692
             $entryid = $this->accept(false, $sendresponse, $move, $proposeNewTimeProps, $body, true, $store, $calFolder, $basedate);
693 693
         } else {
694 694
             $entryid = $this->accept($tentative, $sendresponse, $move, $proposeNewTimeProps, $body, $userAction, $store, $calFolder, $basedate);
695 695
         }
696 696
 
697 697
         // if we have first time processed this meeting then set PR_PROCESSED property
698
-        if($this->isMeetingRequest($messageprops[PR_MESSAGE_CLASS]) && $userAction === false && $isImported === false) {
699
-            if(!isset($messageprops[PR_PROCESSED]) || $messageprops[PR_PROCESSED] != true) {
698
+        if ($this->isMeetingRequest($messageprops[PR_MESSAGE_CLASS]) && $userAction === false && $isImported === false) {
699
+            if (!isset($messageprops[PR_PROCESSED]) || $messageprops[PR_PROCESSED] != true) {
700 700
                 // set processed flag
701 701
                 mapi_setprops($this->message, Array(PR_PROCESSED => true));
702 702
                 mapi_savechanges($this->message);
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
                 // Find main recurring item based on GlobalID (0x3)
737 737
                 $items = $this->findCalendarItems($messageprops[$this->proptags['goid2']], $calFolder);
738 738
                 if (is_array($items)) {
739
-                    foreach($items as $key => $entryid) {
739
+                    foreach ($items as $key => $entryid) {
740 740
                         $calendarItem = mapi_msgstore_openentry($store, $entryid);
741 741
                     }
742 742
                 }
@@ -747,14 +747,14 @@  discard block
 block discarded – undo
747 747
                     $calendarItem = mapi_folder_createmessage($calFolder);
748 748
                 } else {
749 749
                     // we have found the main recurring item, check if this meeting request is already processed
750
-                    if(isset($messageprops[PR_PROCESSED]) && $messageprops[PR_PROCESSED] == true) {
750
+                    if (isset($messageprops[PR_PROCESSED]) && $messageprops[PR_PROCESSED] == true) {
751 751
                         // only set required properties, other properties are already copied when processing this meeting request
752 752
                         // for the first time
753 753
                         $processed = true;
754 754
                     }
755 755
                 }
756 756
 
757
-                if(!$processed) {
757
+                if (!$processed) {
758 758
                     // get all the properties and copy that to calendar item
759 759
                     $props = mapi_getprops($this->message);
760 760
 
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
                 $props[$this->proptags['responsestatus']] = $userAction ? ($tentative ? olResponseTentative : olResponseAccepted) : olResponseNotResponded;
786 786
 
787 787
                 if (isset($props[$this->proptags['intendedbusystatus']])) {
788
-                    if($tentative && $props[$this->proptags['intendedbusystatus']] !== fbFree) {
788
+                    if ($tentative && $props[$this->proptags['intendedbusystatus']] !== fbFree) {
789 789
                         $props[$this->proptags['busystatus']] = fbTentative;
790 790
                     } else {
791 791
                         $props[$this->proptags['busystatus']] = $props[$this->proptags['intendedbusystatus']];
@@ -795,12 +795,12 @@  discard block
 block discarded – undo
795 795
                     $props[$this->proptags['busystatus']] = $tentative ? fbTentative : fbBusy;
796 796
                 }
797 797
 
798
-                if($userAction) {
798
+                if ($userAction) {
799 799
                     $addrInfo = $this->getOwnerAddress($this->store);
800 800
 
801 801
                     // if user has responded then set replytime and name
802 802
                     $props[$this->proptags['replytime']] = time();
803
-                    if(!empty($addrInfo)) {
803
+                    if (!empty($addrInfo)) {
804 804
                         // @FIXME conditionally set this property only for delegation case
805 805
                         $props[$this->proptags['apptreplyname']] = $addrInfo[0];
806 806
                     }
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
                 mapi_setprops($calendarItem, $props);
810 810
 
811 811
                 // we have already processed attachments and recipients, so no need to do it again
812
-                if(!$processed) {
812
+                if (!$processed) {
813 813
                     // Copy attachments too
814 814
                     $this->replaceAttachments($this->message, $calendarItem);
815 815
                     // Copy recipients too
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
                 $items = $this->findCalendarItems($messageprops[$this->proptags['goid2']], $calFolder, true);
822 822
                 if (is_array($items)) {
823 823
                     // Save all existing occurrence as exceptions
824
-                    foreach($items as $entryid) {
824
+                    foreach ($items as $entryid) {
825 825
                         // Open occurrence
826 826
                         $occurrenceItem = mapi_msgstore_openentry($store, $entryid);
827 827
 
@@ -867,7 +867,7 @@  discard block
 block discarded – undo
867 867
                     // Find main recurring item from CleanGlobalID of this meeting request
868 868
                     $items = $this->findCalendarItems($messageprops[$this->proptags['goid2']], $calFolder);
869 869
                     if (is_array($items)) {
870
-                        foreach($items as $key => $entryid) {
870
+                        foreach ($items as $key => $entryid) {
871 871
                             $calendarItem = mapi_msgstore_openentry($store, $entryid);
872 872
                         }
873 873
                     }
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
                         mapi_copyto($this->message, array(), array(), $calmsg); /* includes attachments and recipients */
903 903
 
904 904
                         // After creating new MR, If local categories exist then apply it on new MR.
905
-                        if(!empty($localCategories)) {
905
+                        if (!empty($localCategories)) {
906 906
                             mapi_setprops($calmsg, $localCategories);
907 907
                         }
908 908
 
@@ -919,7 +919,7 @@  discard block
 block discarded – undo
919 919
                         }
920 920
 
921 921
                         if (isset($messageprops[$this->proptags['intendedbusystatus']])) {
922
-                            if($tentative && $messageprops[$this->proptags['intendedbusystatus']] !== fbFree) {
922
+                            if ($tentative && $messageprops[$this->proptags['intendedbusystatus']] !== fbFree) {
923 923
                                 $calItemProps[$this->proptags['busystatus']] = fbTentative;
924 924
                             } else {
925 925
                                 $calItemProps[$this->proptags['busystatus']] = $messageprops[$this->proptags['intendedbusystatus']];
@@ -931,12 +931,12 @@  discard block
 block discarded – undo
931 931
 
932 932
                         // when we are automatically processing the meeting request set responsestatus to olResponseNotResponded
933 933
                         $calItemProps[$this->proptags['responsestatus']] = $userAction ? ($tentative ? olResponseTentative : olResponseAccepted) : olResponseNotResponded;
934
-                        if($userAction) {
934
+                        if ($userAction) {
935 935
                             $addrInfo = $this->getOwnerAddress($this->store);
936 936
 
937 937
                             // if user has responded then set replytime and name
938 938
                             $calItemProps[$this->proptags['replytime']] = time();
939
-                            if(!empty($addrInfo)) {
939
+                            if (!empty($addrInfo)) {
940 940
                                 $calItemProps[$this->proptags['apptreplyname']] = $addrInfo[0];
941 941
                             }
942 942
                         }
@@ -991,7 +991,7 @@  discard block
 block discarded – undo
991 991
                         $props[$this->proptags['responsestatus']] = $userAction ? ($tentative ? olResponseTentative : olResponseAccepted) : olResponseNotResponded;
992 992
 
993 993
                         if (isset($props[$this->proptags['intendedbusystatus']])) {
994
-                            if($tentative && $props[$this->proptags['intendedbusystatus']] !== fbFree) {
994
+                            if ($tentative && $props[$this->proptags['intendedbusystatus']] !== fbFree) {
995 995
                                 $props[$this->proptags['busystatus']] = fbTentative;
996 996
                             } else {
997 997
                                 $props[$this->proptags['busystatus']] = $props[$this->proptags['intendedbusystatus']];
@@ -1001,12 +1001,12 @@  discard block
 block discarded – undo
1001 1001
                             $props[$this->proptags['busystatus']] = $tentative ? fbTentative : fbBusy;
1002 1002
                         }
1003 1003
 
1004
-                        if($userAction) {
1004
+                        if ($userAction) {
1005 1005
                             $addrInfo = $this->getOwnerAddress($this->store);
1006 1006
 
1007 1007
                             // if user has responded then set replytime and name
1008 1008
                             $props[$this->proptags['replytime']] = time();
1009
-                            if(!empty($addrInfo)) {
1009
+                            if (!empty($addrInfo)) {
1010 1010
                                 $props[$this->proptags['apptreplyname']] = $addrInfo[0];
1011 1011
                             }
1012 1012
                         }
@@ -1049,7 +1049,7 @@  discard block
 block discarded – undo
1049 1049
             $props[$this->proptags['responsestatus']] = $tentative ? olResponseTentative : olResponseAccepted;
1050 1050
 
1051 1051
             if (isset($messageprops[$this->proptags['intendedbusystatus']])) {
1052
-                if($tentative && $messageprops[$this->proptags['intendedbusystatus']] !== fbFree) {
1052
+                if ($tentative && $messageprops[$this->proptags['intendedbusystatus']] !== fbFree) {
1053 1053
                     $props[$this->proptags['busystatus']] = fbTentative;
1054 1054
                 } else {
1055 1055
                     $props[$this->proptags['busystatus']] = $messageprops[$this->proptags['intendedbusystatus']];
@@ -1065,7 +1065,7 @@  discard block
 block discarded – undo
1065 1065
 
1066 1066
             // if user has responded then set replytime and name
1067 1067
             $props[$this->proptags['replytime']] = time();
1068
-            if(!empty($addrInfo)) {
1068
+            if (!empty($addrInfo)) {
1069 1069
                 $props[$this->proptags['apptreplyname']] = $addrInfo[0];
1070 1070
             }
1071 1071
 
@@ -1076,7 +1076,7 @@  discard block
 block discarded – undo
1076 1076
                 $reciptable = mapi_message_getrecipienttable($this->message);
1077 1077
                 $recips = mapi_table_queryallrows($reciptable, $this->recipprops);
1078 1078
 
1079
-                if($recurr->isException($basedate)) {
1079
+                if ($recurr->isException($basedate)) {
1080 1080
                     $recurr->modifyException($proposeNewTimeProps + $props, $basedate, $recips);
1081 1081
                 } else {
1082 1082
                     $props[$this->proptags['startdate']] = $recurr->getOccurrenceStart($basedate);
@@ -1114,7 +1114,7 @@  discard block
 block discarded – undo
1114 1114
      */
1115 1115
     function doDecline($sendresponse, $basedate = false, $body = false)
1116 1116
     {
1117
-        if($this->isLocalOrganiser()) {
1117
+        if ($this->isLocalOrganiser()) {
1118 1118
             return false;
1119 1119
         }
1120 1120
 
@@ -1136,7 +1136,7 @@  discard block
 block discarded – undo
1136 1136
         }
1137 1137
 
1138 1138
         // check for calendar access before deleting the calendar item
1139
-        if($this->checkCalendarWriteAccess($store) !== true) {
1139
+        if ($this->checkCalendarWriteAccess($store) !== true) {
1140 1140
             // Throw an exception that we don't have write permissions on calendar folder,
1141 1141
             // allow caller to fill the error message
1142 1142
             throw new MAPIException(null, MAPI_E_NO_ACCESS);
@@ -1151,7 +1151,7 @@  discard block
 block discarded – undo
1151 1151
             $basedate = $this->getBasedateFromGlobalID($goid);
1152 1152
         }
1153 1153
 
1154
-        if($sendresponse) {
1154
+        if ($sendresponse) {
1155 1155
             $this->createResponse(olResponseDeclined, array(), $body, $store, $basedate, $calFolder);
1156 1156
         }
1157 1157
 
@@ -1160,7 +1160,7 @@  discard block
 block discarded – undo
1160 1160
             $calendaritems = $this->findCalendarItems($messageprops[$this->proptags['goid2']], $calFolder);
1161 1161
 
1162 1162
             if (is_array($calendaritems)) {
1163
-                foreach($calendaritems as $entryid) {
1163
+                foreach ($calendaritems as $entryid) {
1164 1164
                     // Open each calendar item and set the properties of the cancellation object
1165 1165
                     $calendaritem = mapi_msgstore_openentry($store, $entryid);
1166 1166
 
@@ -1180,7 +1180,7 @@  discard block
 block discarded – undo
1180 1180
         if (!$calendaritem) {
1181 1181
             $calendar = $this->openDefaultCalendar($store);
1182 1182
 
1183
-            if(!empty($entryids)) {
1183
+            if (!empty($entryids)) {
1184 1184
                 mapi_folder_deletemessages($calendar, $entryids);
1185 1185
             }
1186 1186
 
@@ -1209,7 +1209,7 @@  discard block
 block discarded – undo
1209 1209
      */
1210 1210
     function doRemoveFromCalendar($basedate)
1211 1211
     {
1212
-        if($this->isLocalOrganiser()) {
1212
+        if ($this->isLocalOrganiser()) {
1213 1213
             return false;
1214 1214
         }
1215 1215
 
@@ -1228,7 +1228,7 @@  discard block
 block discarded – undo
1228 1228
         }
1229 1229
 
1230 1230
         // check for calendar access before deleting the calendar item
1231
-        if($this->checkCalendarWriteAccess($store) !== true) {
1231
+        if ($this->checkCalendarWriteAccess($store) !== true) {
1232 1232
             // Throw an exception that we don't have write permissions on calendar folder,
1233 1233
             // allow caller to fill the error message
1234 1234
             throw new MAPIException(null, MAPI_E_NO_ACCESS);
@@ -1245,12 +1245,12 @@  discard block
 block discarded – undo
1245 1245
 
1246 1246
             $calendarItem = $this->getCorrespondentCalendarItem(true);
1247 1247
 
1248
-            if($calendarItem !== false) {
1248
+            if ($calendarItem !== false) {
1249 1249
                 // basedate is provided so open exception
1250
-                if($basedate) {
1250
+                if ($basedate) {
1251 1251
                     $exception = $this->getExceptionItem($calendarItem, $basedate);
1252 1252
 
1253
-                    if($exception !== false) {
1253
+                    if ($exception !== false) {
1254 1254
                         // exception found, remove it from calendar
1255 1255
                         $this->doRemoveExceptionFromCalendar($basedate, $calendarItem, $store);
1256 1256
                     }
@@ -1291,12 +1291,12 @@  discard block
 block discarded – undo
1291 1291
      */
1292 1292
     function doCancelInvitation($basedate = false)
1293 1293
     {
1294
-        if(!$this->isLocalOrganiser()) {
1294
+        if (!$this->isLocalOrganiser()) {
1295 1295
             return;
1296 1296
         }
1297 1297
 
1298 1298
         // check write access for delegate
1299
-        if($this->checkCalendarWriteAccess($this->store) !== true) {
1299
+        if ($this->checkCalendarWriteAccess($this->store) !== true) {
1300 1300
             // Throw an exception that we don't have write permissions on calendar folder,
1301 1301
             // error message will be filled by module
1302 1302
             throw new MAPIException(null, MAPI_E_NO_ACCESS);
@@ -1304,12 +1304,12 @@  discard block
 block discarded – undo
1304 1304
 
1305 1305
         $messageProps = mapi_getprops($this->message, array(PR_ENTRYID, $this->proptags['recurring']));
1306 1306
 
1307
-        if(isset($messageProps[$this->proptags['recurring']]) && $messageProps[$this->proptags['recurring']] === true) {
1307
+        if (isset($messageProps[$this->proptags['recurring']]) && $messageProps[$this->proptags['recurring']] === true) {
1308 1308
             // cancellation of recurring series or one occurence
1309 1309
             $recurrence = new Recurrence($this->store, $this->message);
1310 1310
 
1311 1311
             // if basedate is specified then we are cancelling only one occurence, so create exception for that occurence
1312
-            if($basedate) {
1312
+            if ($basedate) {
1313 1313
                 $recurrence->createException(array(), $basedate, true);
1314 1314
             }
1315 1315
 
@@ -1333,7 +1333,7 @@  discard block
 block discarded – undo
1333 1333
 
1334 1334
         // if basedate is specified then we have already created exception of it so nothing should be done now
1335 1335
         // but when cancelling normal / recurring meeting request we need to remove meeting from calendar
1336
-        if($basedate === false) {
1336
+        if ($basedate === false) {
1337 1337
             // get the wastebasket folder, for delegate this will give wastebasket of delegate
1338 1338
             $wastebasket = $this->openDefaultWastebasket($this->openDefaultStore());
1339 1339
 
@@ -1382,7 +1382,7 @@  discard block
 block discarded – undo
1382 1382
         // Length of the random data
1383 1383
         $goid .= pack('V', 16);
1384 1384
         // Random data.
1385
-        for ($i=0; $i<16; $i++)
1385
+        for ($i = 0; $i < 16; $i++)
1386 1386
             $goid .= chr(rand(0, 255));
1387 1387
 
1388 1388
         // Create a new appointment id for this item
@@ -1394,7 +1394,7 @@  discard block
 block discarded – undo
1394 1394
         $props[$this->proptags['goid2']] = $goid;
1395 1395
 
1396 1396
         if (!isset($props[$this->proptags['updatecounter']])) {
1397
-            $props[$this->proptags['updatecounter']] = 0;            // OL also starts sequence no with zero.
1397
+            $props[$this->proptags['updatecounter']] = 0; // OL also starts sequence no with zero.
1398 1398
             $props[$this->proptags['last_updatecounter']] = 0;
1399 1399
         }
1400 1400
 
@@ -1441,7 +1441,7 @@  discard block
 block discarded – undo
1441 1441
                 // Then send all meeting request for all exceptions
1442 1442
                 $exceptions = $recurr->getAllExceptions();
1443 1443
                 if ($exceptions) {
1444
-                    foreach($exceptions as $exceptionBasedate) {
1444
+                    foreach ($exceptions as $exceptionBasedate) {
1445 1445
                         $attach = $recurr->getExceptionAttachment($exceptionBasedate);
1446 1446
 
1447 1447
                         if ($attach) {
@@ -1489,12 +1489,12 @@  discard block
 block discarded – undo
1489 1489
             }
1490 1490
         }
1491 1491
 
1492
-        if(isset($this->errorSetResource) && $this->errorSetResource){
1492
+        if (isset($this->errorSetResource) && $this->errorSetResource) {
1493 1493
             return Array(
1494 1494
                 'error' => $this->errorSetResource,
1495 1495
                 'displayname' => $this->recipientDisplayname
1496 1496
             );
1497
-        }else{
1497
+        } else {
1498 1498
             return true;
1499 1499
         }
1500 1500
     }
@@ -1514,23 +1514,23 @@  discard block
 block discarded – undo
1514 1514
 
1515 1515
         $fbDataArray = mapi_freebusysupport_loaddata($fbsupport, array($entryID));
1516 1516
 
1517
-        if($fbDataArray[0] != NULL){
1518
-            foreach($fbDataArray as $fbDataUser){
1517
+        if ($fbDataArray[0] != NULL) {
1518
+            foreach ($fbDataArray as $fbDataUser) {
1519 1519
                 $rangeuser1 = mapi_freebusydata_getpublishrange($fbDataUser);
1520
-                if($rangeuser1 == NULL){
1520
+                if ($rangeuser1 == NULL) {
1521 1521
                     return $result;
1522 1522
                 }
1523 1523
 
1524 1524
                 $enumblock = mapi_freebusydata_enumblocks($fbDataUser, $start, $end);
1525 1525
                 mapi_freebusyenumblock_reset($enumblock);
1526 1526
 
1527
-                while(true){
1527
+                while (true) {
1528 1528
                     $blocks = mapi_freebusyenumblock_next($enumblock, 100);
1529
-                    if(!$blocks){
1529
+                    if (!$blocks) {
1530 1530
                         break;
1531 1531
                     }
1532 1532
 
1533
-                    foreach($blocks as $blockItem){
1533
+                    foreach ($blocks as $blockItem) {
1534 1534
                         $result[] = $blockItem;
1535 1535
                     }
1536 1536
                 }
@@ -1553,7 +1553,7 @@  discard block
 block discarded – undo
1553 1553
     {
1554 1554
         $messageprops = mapi_getprops($this->message, Array($this->proptags['last_updatecounter'], $this->proptags['goid']));
1555 1555
 
1556
-        if ( !isset($messageprops[$this->proptags['goid']]) ) {
1556
+        if (!isset($messageprops[$this->proptags['goid']])) {
1557 1557
             $this->setMeetingRequest($basedate);
1558 1558
         } else {
1559 1559
             $counter = $messageprops[$this->proptags['last_updatecounter']] + 1;
@@ -1572,7 +1572,7 @@  discard block
 block discarded – undo
1572 1572
     {
1573 1573
         $props = mapi_getprops($this->message, array($this->proptags['goid'], PR_MESSAGE_CLASS));
1574 1574
 
1575
-        if(!$this->isMeetingRequest($props[PR_MESSAGE_CLASS]) && !$this->isMeetingRequestResponse($props[PR_MESSAGE_CLASS]) && !$this->isMeetingCancellation($props[PR_MESSAGE_CLASS])) {
1575
+        if (!$this->isMeetingRequest($props[PR_MESSAGE_CLASS]) && !$this->isMeetingRequestResponse($props[PR_MESSAGE_CLASS]) && !$this->isMeetingCancellation($props[PR_MESSAGE_CLASS])) {
1576 1576
             // we are checking with calendar item
1577 1577
             $calendarItem = $this->message;
1578 1578
         } else {
@@ -1584,10 +1584,10 @@  discard block
 block discarded – undo
1584 1584
         // even if we have received request/response for exception/occurence then also
1585 1585
         // we can check recurring series for organizer, no need to check with exception/occurence
1586 1586
 
1587
-        if($calendarItem !== false) {
1587
+        if ($calendarItem !== false) {
1588 1588
             $messageProps = mapi_getprops($calendarItem, Array($this->proptags['responsestatus']));
1589 1589
 
1590
-            if(isset($messageProps[$this->proptags['responsestatus']]) && $messageProps[$this->proptags['responsestatus']] === olResponseOrganized) {
1590
+            if (isset($messageProps[$this->proptags['responsestatus']]) && $messageProps[$this->proptags['responsestatus']] === olResponseOrganized) {
1591 1591
                 return true;
1592 1592
             }
1593 1593
         }
@@ -1606,7 +1606,7 @@  discard block
 block discarded – undo
1606 1606
     function getTrackStatus($class)
1607 1607
     {
1608 1608
         $status = olRecipientTrackStatusNone;
1609
-        switch($class)
1609
+        switch ($class)
1610 1610
         {
1611 1611
             case 'IPM.Schedule.Meeting.Resp.Pos':
1612 1612
                 $status = olRecipientTrackStatusAccepted;
@@ -1723,7 +1723,7 @@  discard block
 block discarded – undo
1723 1723
         $folder = false;
1724 1724
         $entryid = $this->getDefaultFolderEntryID($prop, $store);
1725 1725
 
1726
-        if($entryid !== false) {
1726
+        if ($entryid !== false) {
1727 1727
             $folder = mapi_msgstore_openentry($store ? $store : $this->store, $entryid);
1728 1728
         }
1729 1729
 
@@ -1741,7 +1741,7 @@  discard block
 block discarded – undo
1741 1741
     function getBaseEntryID($prop, $store = false)
1742 1742
     {
1743 1743
         $storeprops = mapi_getprops($store ? $store : $this->store, Array($prop));
1744
-        if(!isset($storeprops[$prop])) {
1744
+        if (!isset($storeprops[$prop])) {
1745 1745
             return false;
1746 1746
         }
1747 1747
 
@@ -1759,7 +1759,7 @@  discard block
 block discarded – undo
1759 1759
         $folder = false;
1760 1760
         $entryid = $this->getBaseEntryID($prop, $store);
1761 1761
 
1762
-        if($entryid !== false) {
1762
+        if ($entryid !== false) {
1763 1763
             $folder = mapi_msgstore_openentry($store ? $store : $this->store, $entryid);
1764 1764
         }
1765 1765
 
@@ -1776,20 +1776,20 @@  discard block
 block discarded – undo
1776 1776
     {
1777 1777
         $accessToFolder = false;
1778 1778
 
1779
-        if(!empty($entryid)) {
1780
-            if($store === false) {
1779
+        if (!empty($entryid)) {
1780
+            if ($store === false) {
1781 1781
                 $store = $this->store;
1782 1782
             }
1783 1783
 
1784 1784
             try {
1785 1785
                 $folder = mapi_msgstore_openentry($store, $entryid);
1786 1786
                 $folderProps = mapi_getprops($folder, Array(PR_ACCESS));
1787
-                if(($folderProps[PR_ACCESS] & MAPI_ACCESS_CREATE_CONTENTS) === MAPI_ACCESS_CREATE_CONTENTS) {
1787
+                if (($folderProps[PR_ACCESS] & MAPI_ACCESS_CREATE_CONTENTS) === MAPI_ACCESS_CREATE_CONTENTS) {
1788 1788
                     $accessToFolder = true;
1789 1789
                 }
1790 1790
             } catch (MAPIException $e) {
1791 1791
                 // we don't have rights to open folder, so return false
1792
-                if($e->getCode() == MAPI_E_NO_ACCESS) {
1792
+                if ($e->getCode() == MAPI_E_NO_ACCESS) {
1793 1793
                     return $accessToFolder;
1794 1794
                 }
1795 1795
 
@@ -1808,7 +1808,7 @@  discard block
 block discarded – undo
1808 1808
      */
1809 1809
     function checkCalendarWriteAccess($store = false)
1810 1810
     {
1811
-        if($store === false) {
1811
+        if ($store === false) {
1812 1812
             // If this meeting request is received by a delegate then open delegator's store.
1813 1813
             $messageProps = mapi_getprops($this->message, array(PR_RCVD_REPRESENTING_ENTRYID));
1814 1814
             if (isset($messageProps[PR_RCVD_REPRESENTING_ENTRYID])) {
@@ -1822,7 +1822,7 @@  discard block
 block discarded – undo
1822 1822
 
1823 1823
         // If the store is a public folder, the calendar folder is the PARENT_ENTRYID of the calendar item
1824 1824
         $provider = mapi_getprops($store, array(PR_MDB_PROVIDER));
1825
-        if(isset($provider[PR_MDB_PROVIDER]) && $provider[PR_MDB_PROVIDER] === ZARAFA_STORE_PUBLIC_GUID) {
1825
+        if (isset($provider[PR_MDB_PROVIDER]) && $provider[PR_MDB_PROVIDER] === ZARAFA_STORE_PUBLIC_GUID) {
1826 1826
             $entryid = mapi_getprops($this->message, array(PR_PARENT_ENTRYID));
1827 1827
             $entryid = $entryid[PR_PARENT_ENTRYID];
1828 1828
         } else {
@@ -1932,10 +1932,10 @@  discard block
 block discarded – undo
1932 1932
             $isRecurring = isset($messageprops[$this->proptags['recurring']]) && $messageprops[$this->proptags['recurring']];
1933 1933
             $isException = isset($messageprops[$this->proptags['is_exception']]) && $messageprops[$this->proptags['is_exception']];
1934 1934
             if ($isRecurring || $isException) {
1935
-                if($isRecurring) {
1935
+                if ($isRecurring) {
1936 1936
                     $props[$this->proptags['recurring']] = $messageprops[$this->proptags['recurring']];
1937 1937
                 }
1938
-                if($isException) {
1938
+                if ($isException) {
1939 1939
                     $props[$this->proptags['is_exception']] = $messageprops[$this->proptags['is_exception']];
1940 1940
                 }
1941 1941
                 $calendaritems = $this->findCalendarItems($messageprops[$this->proptags['goid2']], $calFolder);
@@ -1946,12 +1946,12 @@  discard block
 block discarded – undo
1946 1946
         }
1947 1947
 
1948 1948
         // we are sending a response for recurring meeting request (or exception), so set some required properties
1949
-        if(isset($recurr) && $recurr) {
1950
-            if(!empty($messageprops[$this->proptags['recurring_pattern']])) {
1949
+        if (isset($recurr) && $recurr) {
1950
+            if (!empty($messageprops[$this->proptags['recurring_pattern']])) {
1951 1951
                 $props[$this->proptags['recurring_pattern']] = $messageprops[$this->proptags['recurring_pattern']];
1952 1952
             }
1953 1953
 
1954
-            if(!empty($messageprops[$this->proptags['recurrence_data']])) {
1954
+            if (!empty($messageprops[$this->proptags['recurrence_data']])) {
1955 1955
                 $props[$this->proptags['recurrence_data']] = $messageprops[$this->proptags['recurrence_data']];
1956 1956
             }
1957 1957
 
@@ -1970,7 +1970,7 @@  discard block
 block discarded – undo
1970 1970
         $recip[PR_RECIPIENT_TYPE] = MAPI_TO;
1971 1971
         $recip[PR_SEARCH_KEY] = $messageprops[PR_SENT_REPRESENTING_SEARCH_KEY];
1972 1972
 
1973
-        switch($status) {
1973
+        switch ($status) {
1974 1974
             case olResponseAccepted:
1975 1975
                 $classpostfix = 'Pos';
1976 1976
                 $subjectprefix = _('Accepted');
@@ -1990,10 +1990,10 @@  discard block
 block discarded – undo
1990 1990
             $subjectprefix = _('New Time Proposed');
1991 1991
         }
1992 1992
 
1993
-        $props[PR_SUBJECT] = $subjectprefix . ': ' . $messageprops[PR_SUBJECT];
1993
+        $props[PR_SUBJECT] = $subjectprefix.': '.$messageprops[PR_SUBJECT];
1994 1994
 
1995
-        $props[PR_MESSAGE_CLASS] = 'IPM.Schedule.Meeting.Resp.' . $classpostfix;
1996
-        if(isset($messageprops[PR_OWNER_APPT_ID]))
1995
+        $props[PR_MESSAGE_CLASS] = 'IPM.Schedule.Meeting.Resp.'.$classpostfix;
1996
+        if (isset($messageprops[PR_OWNER_APPT_ID]))
1997 1997
             $props[PR_OWNER_APPT_ID] = $messageprops[PR_OWNER_APPT_ID];
1998 1998
 
1999 1999
         // Set GlobalId AND CleanGlobalId, if exception then also set basedate into GlobalId(0x3).
@@ -2007,7 +2007,7 @@  discard block
 block discarded – undo
2007 2007
         }
2008 2008
 
2009 2009
         //Set body message in Appointment
2010
-        if(isset($body)) {
2010
+        if (isset($body)) {
2011 2011
             $props[PR_BODY] = $this->getMeetingTimeInfo() ? $this->getMeetingTimeInfo() : $body;
2012 2012
         }
2013 2013
 
@@ -2041,7 +2041,7 @@  discard block
 block discarded – undo
2041 2041
      */
2042 2042
     function findCalendarItems($goid, $calendar = false, $useCleanGlobalId = false)
2043 2043
     {
2044
-        if($calendar === false) {
2044
+        if ($calendar === false) {
2045 2045
             // Open the Calendar
2046 2046
             $calendar = $this->openDefaultCalendar();
2047 2047
         }
@@ -2061,13 +2061,13 @@  discard block
 block discarded – undo
2061 2061
 
2062 2062
         $rows = mapi_table_queryallrows($calendarcontents, Array(PR_ENTRYID), $restrict);
2063 2063
 
2064
-        if(empty($rows))
2064
+        if (empty($rows))
2065 2065
             return;
2066 2066
 
2067 2067
         $calendaritems = Array();
2068 2068
 
2069 2069
         // In principle, there should only be one row, but we'll handle them all just in case
2070
-        foreach($rows as $row) {
2070
+        foreach ($rows as $row) {
2071 2071
             $calendaritems[] = $row[PR_ENTRYID];
2072 2072
         }
2073 2073
 
@@ -2079,14 +2079,14 @@  discard block
 block discarded – undo
2079 2079
     function compareABEntryIDs($entryid1, $entryid2)
2080 2080
     {
2081 2081
         // If the session was not passed, just do a 'normal' compare.
2082
-        if(!$this->session) {
2082
+        if (!$this->session) {
2083 2083
             return $entryid1 == $entryid2;
2084 2084
         }
2085 2085
 
2086 2086
         $smtp1 = $this->getSMTPAddress($entryid1);
2087 2087
         $smtp2 = $this->getSMTPAddress($entryid2);
2088 2088
 
2089
-        if($smtp1 == $smtp2) {
2089
+        if ($smtp1 == $smtp2) {
2090 2090
             return true;
2091 2091
         } else {
2092 2092
             return false;
@@ -2096,7 +2096,7 @@  discard block
 block discarded – undo
2096 2096
     // Gets the SMTP address of the passed addressbook entryid
2097 2097
     function getSMTPAddress($entryid)
2098 2098
     {
2099
-        if(!$this->session) {
2099
+        if (!$this->session) {
2100 2100
             return false;
2101 2101
         }
2102 2102
 
@@ -2104,13 +2104,13 @@  discard block
 block discarded – undo
2104 2104
 
2105 2105
         $abitem = mapi_ab_openentry($ab, $entryid);
2106 2106
 
2107
-        if(!$abitem) {
2107
+        if (!$abitem) {
2108 2108
             return '';
2109 2109
         }
2110 2110
 
2111 2111
         $props = mapi_getprops($abitem, array(PR_ADDRTYPE, PR_EMAIL_ADDRESS, PR_SMTP_ADDRESS));
2112 2112
 
2113
-        if($props[PR_ADDRTYPE] == 'SMTP') {
2113
+        if ($props[PR_ADDRTYPE] == 'SMTP') {
2114 2114
             return $props[PR_EMAIL_ADDRESS];
2115 2115
         }
2116 2116
         return $props[PR_SMTP_ADDRESS];
@@ -2128,25 +2128,25 @@  discard block
 block discarded – undo
2128 2128
      */
2129 2129
     function getOwnerAddress($store, $fallbackToLoggedInUser = true)
2130 2130
     {
2131
-        if(!$this->session)
2131
+        if (!$this->session)
2132 2132
             return false;
2133 2133
 
2134 2134
         $storeProps = mapi_getprops($store, array(PR_MAILBOX_OWNER_ENTRYID, PR_USER_ENTRYID));
2135 2135
 
2136 2136
         $ownerEntryId = false;
2137
-        if(isset($storeProps[PR_USER_ENTRYID]) && $storeProps[PR_USER_ENTRYID]) {
2137
+        if (isset($storeProps[PR_USER_ENTRYID]) && $storeProps[PR_USER_ENTRYID]) {
2138 2138
             $ownerEntryId = $storeProps[PR_USER_ENTRYID];
2139 2139
         }
2140 2140
 
2141
-        if(isset($storeProps[PR_MAILBOX_OWNER_ENTRYID]) && $storeProps[PR_MAILBOX_OWNER_ENTRYID] && !$fallbackToLoggedInUser) {
2141
+        if (isset($storeProps[PR_MAILBOX_OWNER_ENTRYID]) && $storeProps[PR_MAILBOX_OWNER_ENTRYID] && !$fallbackToLoggedInUser) {
2142 2142
             $ownerEntryId = $storeProps[PR_MAILBOX_OWNER_ENTRYID];
2143 2143
         }
2144 2144
 
2145
-        if($ownerEntryId) {
2145
+        if ($ownerEntryId) {
2146 2146
             $ab = mapi_openaddressbook($this->session);
2147 2147
 
2148 2148
             $zarafaUser = mapi_ab_openentry($ab, $ownerEntryId);
2149
-            if(!$zarafaUser)
2149
+            if (!$zarafaUser)
2150 2150
                 return false;
2151 2151
 
2152 2152
             $ownerProps = mapi_getprops($zarafaUser, array(PR_ADDRTYPE, PR_DISPLAY_NAME, PR_EMAIL_ADDRESS, PR_SEARCH_KEY));
@@ -2169,14 +2169,14 @@  discard block
 block discarded – undo
2169 2169
         $storestable = mapi_getmsgstorestable($this->session);
2170 2170
         $rows = mapi_table_queryallrows($storestable, array(PR_ENTRYID, PR_DEFAULT_STORE));
2171 2171
 
2172
-        foreach($rows as $row) {
2173
-            if(isset($row[PR_DEFAULT_STORE]) && $row[PR_DEFAULT_STORE]) {
2172
+        foreach ($rows as $row) {
2173
+            if (isset($row[PR_DEFAULT_STORE]) && $row[PR_DEFAULT_STORE]) {
2174 2174
                 $entryid = $row[PR_ENTRYID];
2175 2175
                 break;
2176 2176
             }
2177 2177
         }
2178 2178
 
2179
-        if(!$entryid)
2179
+        if (!$entryid)
2180 2180
             return false;
2181 2181
 
2182 2182
         return mapi_openmsgstore($this->session, $entryid);
@@ -2190,20 +2190,20 @@  discard block
 block discarded – undo
2190 2190
      * @param array $recipients    recipients list of message.
2191 2191
      * @param boolean $isException true if we are processing recipient of exception
2192 2192
      */
2193
-    function addOrganizer($messageProps, &$recipients, $isException = false){
2193
+    function addOrganizer($messageProps, &$recipients, $isException = false) {
2194 2194
 
2195 2195
         $hasOrganizer = false;
2196 2196
         // Check if meeting already has an organizer.
2197
-        foreach ($recipients as $key => $recipient){
2198
-            if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable | recipOrganizer)) {
2197
+        foreach ($recipients as $key => $recipient) {
2198
+            if (isset($recipient[PR_RECIPIENT_FLAGS]) && $recipient[PR_RECIPIENT_FLAGS] == (recipSendable|recipOrganizer)) {
2199 2199
                 $hasOrganizer = true;
2200
-            } else if ($isException && !isset($recipient[PR_RECIPIENT_FLAGS])){
2200
+            } else if ($isException && !isset($recipient[PR_RECIPIENT_FLAGS])) {
2201 2201
                 // Recipients for an occurrence
2202
-                $recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable | recipExceptionalResponse;
2202
+                $recipients[$key][PR_RECIPIENT_FLAGS] = recipSendable|recipExceptionalResponse;
2203 2203
             }
2204 2204
         }
2205 2205
 
2206
-        if (!$hasOrganizer){
2206
+        if (!$hasOrganizer) {
2207 2207
             // Create organizer.
2208 2208
             $organizer = array();
2209 2209
             $organizer[PR_ENTRYID] = $messageProps[PR_SENT_REPRESENTING_ENTRYID];
@@ -2213,7 +2213,7 @@  discard block
 block discarded – undo
2213 2213
             $organizer[PR_RECIPIENT_DISPLAY_NAME] = $messageProps[PR_SENT_REPRESENTING_NAME];
2214 2214
             $organizer[PR_ADDRTYPE] = empty($messageProps[PR_SENT_REPRESENTING_ADDRTYPE]) ? 'SMTP' : $messageProps[PR_SENT_REPRESENTING_ADDRTYPE];
2215 2215
             $organizer[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone;
2216
-            $organizer[PR_RECIPIENT_FLAGS] = recipSendable | recipOrganizer;
2216
+            $organizer[PR_RECIPIENT_FLAGS] = recipSendable|recipOrganizer;
2217 2217
             $organizer[PR_SEARCH_KEY] = $messageProps[PR_SENT_REPRESENTING_SEARCH_KEY];
2218 2218
 
2219 2219
             // Add organizer to recipients list.
@@ -2267,7 +2267,7 @@  discard block
 block discarded – undo
2267 2267
         $month = $basedate ? sprintf('%02s', dechex(gmdate('m', $basedate))) : '00';
2268 2268
         $day = $basedate ? sprintf('%02s', dechex(gmdate('d', $basedate))) : '00';
2269 2269
 
2270
-        return hex2bin(strtoupper(substr($hexguid, 0, 32) . $year . $month . $day . substr($hexguid, 40)));
2270
+        return hex2bin(strtoupper(substr($hexguid, 0, 32).$year.$month.$day.substr($hexguid, 40)));
2271 2271
     }
2272 2272
 
2273 2273
     /**
@@ -2280,10 +2280,10 @@  discard block
 block discarded – undo
2280 2280
     {
2281 2281
         /* remove all old attachments */
2282 2282
         $attachmentTable = mapi_message_getattachmenttable($copyTo);
2283
-        if($attachmentTable) {
2283
+        if ($attachmentTable) {
2284 2284
             $attachments = mapi_table_queryallrows($attachmentTable, array(PR_ATTACH_NUM, PR_ATTACH_METHOD, PR_EXCEPTION_STARTTIME));
2285 2285
 
2286
-            foreach($attachments as $attachProps){
2286
+            foreach ($attachments as $attachProps) {
2287 2287
                 /* remove exceptions too? */
2288 2288
                 if (!$copyExceptions && $attachProps[PR_ATTACH_METHOD] == ATTACH_EMBEDDED_MSG && isset($attachProps[PR_EXCEPTION_STARTTIME])) {
2289 2289
                     continue;
@@ -2295,15 +2295,15 @@  discard block
 block discarded – undo
2295 2295
 
2296 2296
         /* copy new attachments */
2297 2297
         $attachmentTable = mapi_message_getattachmenttable($copyFrom);
2298
-        if($attachmentTable) {
2298
+        if ($attachmentTable) {
2299 2299
             $attachments = mapi_table_queryallrows($attachmentTable, array(PR_ATTACH_NUM, PR_ATTACH_METHOD, PR_EXCEPTION_STARTTIME));
2300 2300
 
2301
-            foreach($attachments as $attachProps){
2301
+            foreach ($attachments as $attachProps) {
2302 2302
                 if (!$copyExceptions && $attachProps[PR_ATTACH_METHOD] == ATTACH_EMBEDDED_MSG && isset($attachProps[PR_EXCEPTION_STARTTIME])) {
2303 2303
                     continue;
2304 2304
                 }
2305 2305
 
2306
-                $attachOld = mapi_message_openattach($copyFrom, (int) $attachProps[PR_ATTACH_NUM]);
2306
+                $attachOld = mapi_message_openattach($copyFrom, (int)$attachProps[PR_ATTACH_NUM]);
2307 2307
                 $attachNewResourceMsg = mapi_message_createattach($copyTo);
2308 2308
                 mapi_copyto($attachOld, array(), array(), $attachNewResourceMsg, 0);
2309 2309
                 mapi_savechanges($attachNewResourceMsg);
@@ -2351,7 +2351,7 @@  discard block
 block discarded – undo
2351 2351
      */
2352 2352
     function bookResources($message, $cancel, $prefix, $basedate = false)
2353 2353
     {
2354
-        if(!$this->enableDirectBooking) {
2354
+        if (!$this->enableDirectBooking) {
2355 2355
             return array();
2356 2356
         }
2357 2357
 
@@ -2388,7 +2388,7 @@  discard block
 block discarded – undo
2388 2388
         // Get resource recipients
2389 2389
         $getResourcesRestriction = Array(RES_AND,
2390 2390
             Array(Array(RES_PROPERTY,
2391
-                Array(RELOP => RELOP_EQ,    // Equals recipient type 3: Resource
2391
+                Array(RELOP => RELOP_EQ, // Equals recipient type 3: Resource
2392 2392
                     ULPROPTAG => PR_RECIPIENT_TYPE,
2393 2393
                     VALUE => array(PR_RECIPIENT_TYPE =>MAPI_BCC)
2394 2394
                 )
@@ -2403,7 +2403,7 @@  discard block
 block discarded – undo
2403 2403
         // Put appointment into store resource users
2404 2404
         $i = 0;
2405 2405
         $len = count($resourceRecipients);
2406
-        while(!$this->errorSetResource && $i < $len){
2406
+        while (!$this->errorSetResource && $i < $len) {
2407 2407
             $userStore = $this->openCustomUserStore($resourceRecipients[$i][PR_ENTRYID]);
2408 2408
 
2409 2409
             // Open root folder
@@ -2427,21 +2427,21 @@  discard block
 block discarded – undo
2427 2427
                 $this->errorSetResource = 1; // No access
2428 2428
             }
2429 2429
 
2430
-            if($accessToFolder) {
2430
+            if ($accessToFolder) {
2431 2431
                 /**
2432 2432
                  * Get the LocalFreebusy message that contains the properties that
2433 2433
                  * are set to accept or decline resource meeting requests
2434 2434
                  */
2435 2435
                 // Use PR_FREEBUSY_ENTRYIDS[1] to open folder the LocalFreeBusy msg
2436 2436
                 $localFreebusyMsg = mapi_msgstore_openentry($userStore, $userRootProps[PR_FREEBUSY_ENTRYIDS][1]);
2437
-                if($localFreebusyMsg){
2437
+                if ($localFreebusyMsg) {
2438 2438
                     $props = mapi_getprops($localFreebusyMsg, array(PR_PROCESS_MEETING_REQUESTS, PR_DECLINE_RECURRING_MEETING_REQUESTS, PR_DECLINE_CONFLICTING_MEETING_REQUESTS));
2439 2439
 
2440 2440
                     $acceptMeetingRequests = isset($props[PR_PROCESS_MEETING_REQUESTS]) ? $props[PR_PROCESS_MEETING_REQUESTS] : false;
2441 2441
                     $declineRecurringMeetingRequests = isset($props[PR_DECLINE_RECURRING_MEETING_REQUESTS]) ? $props[PR_DECLINE_RECURRING_MEETING_REQUESTS] : false;
2442 2442
                     $declineConflictingMeetingRequests = isset($props[PR_DECLINE_CONFLICTING_MEETING_REQUESTS]) ? $props[PR_DECLINE_CONFLICTING_MEETING_REQUESTS] : false;
2443 2443
 
2444
-                    if(!$acceptMeetingRequests){
2444
+                    if (!$acceptMeetingRequests) {
2445 2445
                         /**
2446 2446
                          * When a resource has not been set to automatically accept meeting requests,
2447 2447
                          * the meeting request has to be sent to him rather than being put directly into
@@ -2449,14 +2449,14 @@  discard block
 block discarded – undo
2449 2449
                          */
2450 2450
                         //$errorSetResource = 2;
2451 2451
                         $this->nonAcceptingResources[] = $resourceRecipients[$i];
2452
-                    }else{
2453
-                        if($declineRecurringMeetingRequests && !$cancel){
2452
+                    } else {
2453
+                        if ($declineRecurringMeetingRequests && !$cancel) {
2454 2454
                             // Check if appointment is recurring
2455
-                            if($messageprops[ $this->proptags['recurring'] ]){
2455
+                            if ($messageprops[$this->proptags['recurring']]) {
2456 2456
                                 $this->errorSetResource = 3;
2457 2457
                             }
2458 2458
                         }
2459
-                        if($declineConflictingMeetingRequests && !$cancel){
2459
+                        if ($declineConflictingMeetingRequests && !$cancel) {
2460 2460
                             // Check for conflicting items
2461 2461
                             if ($calFolder && $this->isMeetingConflicting($message, $userStore, $calFolder)) {
2462 2462
                                 $this->errorSetResource = 4; // Conflict
@@ -2466,7 +2466,7 @@  discard block
 block discarded – undo
2466 2466
                 }
2467 2467
             }
2468 2468
 
2469
-            if(!$this->errorSetResource && $accessToFolder){
2469
+            if (!$this->errorSetResource && $accessToFolder) {
2470 2470
                 /**
2471 2471
                  * First search on GlobalID(0x3)
2472 2472
                  * If (recurring and occurrence) If Resource was booked for only this occurrence then Resource should have only this occurrence in Calendar and not whole series.
@@ -2480,7 +2480,7 @@  discard block
 block discarded – undo
2480 2480
                  * OR
2481 2481
                  * 2) We were looking for occurrence item but Resource has whole series
2482 2482
                  */
2483
-                if(empty($rows)){
2483
+                if (empty($rows)) {
2484 2484
                     /**
2485 2485
                      * Now search on CleanGlobalID(0x23) WHY???
2486 2486
                      * Because we are looking recurring item
@@ -2494,7 +2494,7 @@  discard block
 block discarded – undo
2494 2494
                     $newResourceMsg = false;
2495 2495
                     if (!empty($rows)) {
2496 2496
                         // Since we are looking for recurring item, open every result and check for 'recurring' property.
2497
-                        foreach($rows as $row) {
2497
+                        foreach ($rows as $row) {
2498 2498
                             $ResourceMsg = mapi_msgstore_openentry($userStore, $row);
2499 2499
                             $ResourceMsgProps = mapi_getprops($ResourceMsg, array($this->proptags['recurring']));
2500 2500
 
@@ -2508,18 +2508,18 @@  discard block
 block discarded – undo
2508 2508
                     // Still no results found. I giveup, create new message.
2509 2509
                     if (!$newResourceMsg)
2510 2510
                         $newResourceMsg = mapi_folder_createmessage($calFolder);
2511
-                }else{
2511
+                } else {
2512 2512
                     $newResourceMsg = mapi_msgstore_openentry($userStore, $rows[0]);
2513 2513
                 }
2514 2514
 
2515 2515
                 // Prefix the subject if needed
2516
-                if($prefix && isset($messageprops[PR_SUBJECT])) {
2517
-                    $messageprops[PR_SUBJECT] = $prefix . $messageprops[PR_SUBJECT];
2516
+                if ($prefix && isset($messageprops[PR_SUBJECT])) {
2517
+                    $messageprops[PR_SUBJECT] = $prefix.$messageprops[PR_SUBJECT];
2518 2518
                 }
2519 2519
 
2520 2520
                 // Set status to cancelled if needed
2521 2521
                 $messageprops[$this->proptags['busystatus']] = fbBusy; // The default status (Busy)
2522
-                if($cancel) {
2522
+                if ($cancel) {
2523 2523
                     $messageprops[$this->proptags['meetingstatus']] = olMeetingCanceled; // The meeting has been canceled
2524 2524
                     $messageprops[$this->proptags['busystatus']] = fbFree; // Free
2525 2525
                 } else {
@@ -2540,11 +2540,11 @@  discard block
 block discarded – undo
2540 2540
                 $defaultStoreProps = mapi_getprops($defaultStore, array(PR_ENTRYID));
2541 2541
 
2542 2542
                 // @FIXME use entryid comparison functions here
2543
-                if($storeProps[PR_ENTRYID] !== $defaultStoreProps[PR_ENTRYID]) {
2543
+                if ($storeProps[PR_ENTRYID] !== $defaultStoreProps[PR_ENTRYID]) {
2544 2544
                     // get delegate information
2545 2545
                     $addrInfo = $this->getOwnerAddress($defaultStore, false);
2546 2546
 
2547
-                    if($addrInfo) {
2547
+                    if ($addrInfo) {
2548 2548
                         list($ownername, $owneremailaddr, $owneraddrtype, $ownerentryid, $ownersearchkey) = $addrInfo;
2549 2549
 
2550 2550
                         $messageprops[PR_SENDER_EMAIL_ADDRESS] = $owneremailaddr;
@@ -2557,7 +2557,7 @@  discard block
 block discarded – undo
2557 2557
                     // get delegator information
2558 2558
                     $addrInfo = $this->getOwnerAddress($this->store, false);
2559 2559
 
2560
-                    if($addrInfo) {
2560
+                    if ($addrInfo) {
2561 2561
                         list($ownername, $owneremailaddr, $owneraddrtype, $ownerentryid, $ownersearchkey) = $addrInfo;
2562 2562
 
2563 2563
                         $messageprops[PR_SENT_REPRESENTING_EMAIL_ADDRESS] = $owneremailaddr;
@@ -2570,7 +2570,7 @@  discard block
 block discarded – undo
2570 2570
                     // get organizer information
2571 2571
                     $addrinfo = $this->getOwnerAddress($this->store);
2572 2572
 
2573
-                    if($addrinfo) {
2573
+                    if ($addrinfo) {
2574 2574
                         list($ownername, $owneremailaddr, $owneraddrtype, $ownerentryid, $ownersearchkey) = $addrinfo;
2575 2575
 
2576 2576
                         $messageprops[PR_SENDER_EMAIL_ADDRESS] = $owneremailaddr;
@@ -2600,7 +2600,7 @@  discard block
 block discarded – undo
2600 2600
                     $this->addOrganizer($messageprops, $recips, true);
2601 2601
 
2602 2602
                     // Update occurrence
2603
-                    if($recurr->isException($basedate))
2603
+                    if ($recurr->isException($basedate))
2604 2604
                         $recurr->modifyException($messageprops, $basedate, $recips);
2605 2605
                     else
2606 2606
                         $recurr->createException($messageprops, $basedate, false, $recips);
@@ -2629,16 +2629,16 @@  discard block
 block discarded – undo
2629 2629
                     'msg' => $newResourceMsg,
2630 2630
                 );
2631 2631
                 $this->includesResources = true;
2632
-            }else{
2632
+            } else {
2633 2633
                 /**
2634 2634
                  * If no other errors occurred and you have no access to the
2635 2635
                  * folder of the resource, throw an error=1.
2636 2636
                  */
2637
-                if(!$this->errorSetResource){
2637
+                if (!$this->errorSetResource) {
2638 2638
                     $this->errorSetResource = 1;
2639 2639
                 }
2640 2640
 
2641
-                for($j = 0, $len = count($resourceRecipData); $j < $len; $j++){
2641
+                for ($j = 0, $len = count($resourceRecipData); $j < $len; $j++) {
2642 2642
                     // Get the EntryID
2643 2643
                     $props = mapi_message_getprops($resourceRecipData[$j]['msg']);
2644 2644
 
@@ -2655,7 +2655,7 @@  discard block
 block discarded – undo
2655 2655
         // Get resource recipients
2656 2656
         $getResourcesRestriction = Array(RES_AND,
2657 2657
             Array(Array(RES_PROPERTY,
2658
-                Array(RELOP => RELOP_EQ,    // Equals recipient type 3: Resource
2658
+                Array(RELOP => RELOP_EQ, // Equals recipient type 3: Resource
2659 2659
                     ULPROPTAG => PR_RECIPIENT_TYPE,
2660 2660
                     VALUE => array(PR_RECIPIENT_TYPE =>MAPI_BCC)
2661 2661
                 )
@@ -2663,9 +2663,9 @@  discard block
 block discarded – undo
2663 2663
         );
2664 2664
         $recipienttable = mapi_message_getrecipienttable($message);
2665 2665
         $resourceRecipients = mapi_table_queryallrows($recipienttable, $this->recipprops, $getResourcesRestriction);
2666
-        if(!empty($resourceRecipients)){
2666
+        if (!empty($resourceRecipients)) {
2667 2667
             // Set Tracking status of resource recipients to olResponseAccepted (3)
2668
-            for($i = 0, $len = count($resourceRecipients); $i < $len; $i++){
2668
+            for ($i = 0, $len = count($resourceRecipients); $i < $len; $i++) {
2669 2669
                 $resourceRecipients[$i][PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusAccepted;
2670 2670
                 $resourceRecipients[$i][PR_RECIPIENT_TRACKSTATUS_TIME] = time();
2671 2671
             }
@@ -2673,16 +2673,16 @@  discard block
 block discarded – undo
2673 2673
         }
2674 2674
 
2675 2675
         // Publish updated free/busy information
2676
-        if(!$this->errorSetResource){
2677
-            for($i = 0, $len = count($resourceRecipData); $i < $len; $i++){
2676
+        if (!$this->errorSetResource) {
2677
+            for ($i = 0, $len = count($resourceRecipData); $i < $len; $i++) {
2678 2678
                 $storeProps = mapi_getprops($resourceRecipData[$i]['store'], array(PR_MAILBOX_OWNER_ENTRYID));
2679
-                if (isset($storeProps[PR_MAILBOX_OWNER_ENTRYID])){
2679
+                if (isset($storeProps[PR_MAILBOX_OWNER_ENTRYID])) {
2680 2680
                     $start = time() - 7 * 24 * 60 * 60;
2681 2681
                     $range = strtotime("+6 month");
2682 2682
                     $range = $range - (7 * 24 * 60 * 60);
2683 2683
 
2684 2684
                     $pub = new FreeBusyPublish($this->session, $resourceRecipData[$i]['store'], $resourceRecipData[$i]['folder'], $storeProps[PR_MAILBOX_OWNER_ENTRYID]);
2685
-                    $pub->publishFB($start, $range ); // publish from one week ago, 6 months ahead
2685
+                    $pub->publishFB($start, $range); // publish from one week ago, 6 months ahead
2686 2686
                 }
2687 2687
             }
2688 2688
         }
@@ -2717,7 +2717,7 @@  discard block
 block discarded – undo
2717 2717
             $res = array(RES_PROPERTY, array(
2718 2718
                                             RELOP => RELOP_NE,
2719 2719
                                             ULPROPTAG => PR_EMAIL_ADDRESS,
2720
-                                            VALUE => array( PR_EMAIL_ADDRESS => $delegate[PR_RECEIVED_BY_EMAIL_ADDRESS] )
2720
+                                            VALUE => array(PR_EMAIL_ADDRESS => $delegate[PR_RECEIVED_BY_EMAIL_ADDRESS])
2721 2721
                                         )
2722 2722
                         );
2723 2723
             $recips = mapi_table_queryallrows($reciptable, $this->recipprops, $res);
@@ -2737,7 +2737,7 @@  discard block
 block discarded – undo
2737 2737
         $exception_props[$this->proptags['responsestatus']] = $userAction ? ($tentative ? olResponseTentative : olResponseAccepted) : olResponseNotResponded;
2738 2738
 
2739 2739
         if (isset($exception_props[$this->proptags['intendedbusystatus']])) {
2740
-            if($tentative && $exception_props[$this->proptags['intendedbusystatus']] !== fbFree) {
2740
+            if ($tentative && $exception_props[$this->proptags['intendedbusystatus']] !== fbFree) {
2741 2741
                 $exception_props[$this->proptags['busystatus']] = fbTentative;
2742 2742
             } else {
2743 2743
                 $exception_props[$this->proptags['busystatus']] = $exception_props[$this->proptags['intendedbusystatus']];
@@ -2747,17 +2747,17 @@  discard block
 block discarded – undo
2747 2747
             $exception_props[$this->proptags['busystatus']] = $tentative ? fbTentative : fbBusy;
2748 2748
         }
2749 2749
 
2750
-        if($userAction) {
2750
+        if ($userAction) {
2751 2751
             $addrInfo = $this->getOwnerAddress($this->store);
2752 2752
 
2753 2753
             // if user has responded then set replytime and name
2754 2754
             $exception_props[$this->proptags['replytime']] = time();
2755
-            if(!empty($addrInfo)) {
2755
+            if (!empty($addrInfo)) {
2756 2756
                 $exception_props[$this->proptags['apptreplyname']] = $addrInfo[0];
2757 2757
             }
2758 2758
         }
2759 2759
 
2760
-        if($recurr->isException($basedate)) {
2760
+        if ($recurr->isException($basedate)) {
2761 2761
             $recurr->modifyException($exception_props, $basedate, $recips, $occurrenceItem);
2762 2762
         } else {
2763 2763
             $recurr->createException($exception_props, $basedate, false, $recips, $occurrenceItem);
@@ -2795,7 +2795,7 @@  discard block
 block discarded – undo
2795 2795
         $reciptable = mapi_message_getrecipienttable($occurrenceItem);
2796 2796
         $recips = mapi_table_queryallrows($reciptable, $this->recipprops);
2797 2797
 
2798
-        if($recurr->isException($basedate)) {
2798
+        if ($recurr->isException($basedate)) {
2799 2799
             $recurr->modifyException($exception_props, $basedate, $recips, $occurrenceItem);
2800 2800
         } else {
2801 2801
             $recurr->createException($exception_props, $basedate, false, $recips, $occurrenceItem);
@@ -2839,7 +2839,7 @@  discard block
 block discarded – undo
2839 2839
             $newmessageprops[$this->proptags['is_exception']] = true;
2840 2840
 
2841 2841
             // Set to high importance
2842
-            if($cancel) $newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH;
2842
+            if ($cancel) $newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH;
2843 2843
 
2844 2844
             // Set startdate and enddate of exception
2845 2845
             if ($cancel && $recurObject) {
@@ -2873,9 +2873,9 @@  discard block
 block discarded – undo
2873 2873
             );
2874 2874
 
2875 2875
             // In direct-booking mode, we don't need to send cancellations to resources
2876
-            if($this->enableDirectBooking) {
2876
+            if ($this->enableDirectBooking) {
2877 2877
                 $restriction[1][] = Array(RES_PROPERTY,
2878
-                                        Array(RELOP => RELOP_NE,    // Does not equal recipient type: MAPI_BCC (Resource)
2878
+                                        Array(RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource)
2879 2879
                                             ULPROPTAG => PR_RECIPIENT_TYPE,
2880 2880
                                             VALUE => array(PR_RECIPIENT_TYPE => MAPI_BCC)
2881 2881
                                         )
@@ -2906,19 +2906,19 @@  discard block
 block discarded – undo
2906 2906
 
2907 2907
         $meetingTimeInfo = $this->getMeetingTimeInfo();
2908 2908
 
2909
-        if($meetingTimeInfo)
2909
+        if ($meetingTimeInfo)
2910 2910
             $newmessageprops[PR_BODY] = $meetingTimeInfo;
2911 2911
 
2912 2912
         // Send all recurrence info in mail, if this is a recurrence meeting.
2913 2913
         if (isset($messageprops[$this->proptags['recurring']]) && $messageprops[$this->proptags['recurring']]) {
2914
-            if(!empty($messageprops[$this->proptags['recurring_pattern']])) {
2914
+            if (!empty($messageprops[$this->proptags['recurring_pattern']])) {
2915 2915
                 $newmessageprops[$this->proptags['recurring_pattern']] = $messageprops[$this->proptags['recurring_pattern']];
2916 2916
             }
2917 2917
             $newmessageprops[$this->proptags['recurrence_data']] = $messageprops[$this->proptags['recurrence_data']];
2918 2918
             $newmessageprops[$this->proptags['timezone_data']] = $messageprops[$this->proptags['timezone_data']];
2919 2919
             $newmessageprops[$this->proptags['timezone']] = $messageprops[$this->proptags['timezone']];
2920 2920
 
2921
-            if($recurObject) {
2921
+            if ($recurObject) {
2922 2922
                 $this->generateRecurDates($recurObject, $messageprops, $newmessageprops);
2923 2923
             }
2924 2924
         }
@@ -2929,9 +2929,9 @@  discard block
 block discarded – undo
2929 2929
 
2930 2930
         // Prefix the subject if needed
2931 2931
         if ($prefix && isset($newmessageprops[PR_SUBJECT]))
2932
-            $newmessageprops[PR_SUBJECT] = $prefix . $newmessageprops[PR_SUBJECT];
2932
+            $newmessageprops[PR_SUBJECT] = $prefix.$newmessageprops[PR_SUBJECT];
2933 2933
 
2934
-        if(isset($newmessageprops[$this->proptags['categories']]) &&
2934
+        if (isset($newmessageprops[$this->proptags['categories']]) &&
2935 2935
             !empty($newmessageprops[$this->proptags['categories']])) {
2936 2936
             unset($newmessageprops[$this->proptags['categories']]);
2937 2937
         }
@@ -2944,13 +2944,13 @@  discard block
 block discarded – undo
2944 2944
         $stripResourcesRestriction = Array(RES_AND,
2945 2945
                                 Array(
2946 2946
                                     Array(RES_BITMASK,
2947
-                                        Array(    ULTYPE        =>    BMR_EQZ,
2947
+                                        Array(ULTYPE        =>    BMR_EQZ,
2948 2948
                                                 ULPROPTAG    =>    PR_RECIPIENT_FLAGS,
2949 2949
                                                 ULMASK        =>    recipExceptionalDeleted
2950 2950
                                         )
2951 2951
                                     ),
2952 2952
                                     Array(RES_BITMASK,
2953
-                                        Array(    ULTYPE        =>    BMR_EQZ,
2953
+                                        Array(ULTYPE        =>    BMR_EQZ,
2954 2954
                                                 ULPROPTAG    =>    PR_RECIPIENT_FLAGS,
2955 2955
                                                 ULMASK        =>    recipOrganizer
2956 2956
                                         )
@@ -2959,10 +2959,10 @@  discard block
 block discarded – undo
2959 2959
         );
2960 2960
 
2961 2961
         // In direct-booking mode, resources do not receive a meeting request
2962
-        if($this->enableDirectBooking) {
2962
+        if ($this->enableDirectBooking) {
2963 2963
             $stripResourcesRestriction[1][] =
2964 2964
                                     Array(RES_PROPERTY,
2965
-                                        Array(RELOP => RELOP_NE,    // Does not equal recipient type: MAPI_BCC (Resource)
2965
+                                        Array(RELOP => RELOP_NE, // Does not equal recipient type: MAPI_BCC (Resource)
2966 2966
                                             ULPROPTAG => PR_RECIPIENT_TYPE,
2967 2967
                                             VALUE => array(PR_RECIPIENT_TYPE => MAPI_BCC)
2968 2968
                                         )
@@ -2997,7 +2997,7 @@  discard block
 block discarded – undo
2997 2997
             $recipients[] = $this->nonAcceptingResources[$i];
2998 2998
         }*/
2999 2999
 
3000
-        if(!empty($modifiedRecips)) {
3000
+        if (!empty($modifiedRecips)) {
3001 3001
             // Strip out the sender/'owner' recipient
3002 3002
             mapi_message_modifyrecipients($new, MODRECIP_ADD, $modifiedRecips);
3003 3003
 
@@ -3068,9 +3068,9 @@  discard block
 block discarded – undo
3068 3068
             $newmessageprops[PR_MESSAGE_CLASS] = 'IPM.Schedule.Meeting.Canceled';
3069 3069
             $newmessageprops[$this->proptags['meetingstatus']] = olMeetingCanceled; // It's a cancel request
3070 3070
             $newmessageprops[$this->proptags['busystatus']] = fbFree; // set the busy status as free
3071
-            $newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH;    // HIGH Importance
3071
+            $newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH; // HIGH Importance
3072 3072
             if (isset($newmessageprops[PR_SUBJECT])) {
3073
-                $newmessageprops[PR_SUBJECT] = _('Canceled: ') . $newmessageprops[PR_SUBJECT];
3073
+                $newmessageprops[PR_SUBJECT] = _('Canceled: ').$newmessageprops[PR_SUBJECT];
3074 3074
             }
3075 3075
 
3076 3076
             mapi_setprops($new, $newmessageprops);
@@ -3119,7 +3119,7 @@  discard block
 block discarded – undo
3119 3119
      */
3120 3120
     function generateRecurDates($recurObject, $messageprops, &$newmessageprops)
3121 3121
     {
3122
-        if($messageprops[$this->proptags['startdate']] && $messageprops[$this->proptags['duedate']]) {
3122
+        if ($messageprops[$this->proptags['startdate']] && $messageprops[$this->proptags['duedate']]) {
3123 3123
             $startDate = date('Y:n:j:G:i:s', $recurObject->fromGMT($recurObject->tz, $messageprops[$this->proptags['startdate']]));
3124 3124
             $endDate = date('Y:n:j:G:i:s', $recurObject->fromGMT($recurObject->tz, $messageprops[$this->proptags['duedate']]));
3125 3125
 
@@ -3128,12 +3128,12 @@  discard block
 block discarded – undo
3128 3128
 
3129 3129
             // [0] => year, [1] => month, [2] => day, [3] => hour, [4] => minutes, [5] => seconds
3130 3130
             // RecurStartDate = year * 512 + month_number * 32 + day_number
3131
-            $newmessageprops[$this->proptags['start_recur_date']] = (((int) $startDate[0]) * 512) + (((int) $startDate[1]) * 32) + ((int) $startDate[2]);
3131
+            $newmessageprops[$this->proptags['start_recur_date']] = (((int)$startDate[0]) * 512) + (((int)$startDate[1]) * 32) + ((int)$startDate[2]);
3132 3132
             // RecurStartTime = hour * 4096 + minutes * 64 + seconds
3133
-            $newmessageprops[$this->proptags['start_recur_time']] = (((int) $startDate[3]) * 4096) + (((int) $startDate[4]) * 64) + ((int) $startDate[5]);
3133
+            $newmessageprops[$this->proptags['start_recur_time']] = (((int)$startDate[3]) * 4096) + (((int)$startDate[4]) * 64) + ((int)$startDate[5]);
3134 3134
 
3135
-            $newmessageprops[$this->proptags['end_recur_date']] = (((int) $endDate[0]) * 512) + (((int) $endDate[1]) * 32) + ((int) $endDate[2]);
3136
-            $newmessageprops[$this->proptags['end_recur_time']] = (((int) $endDate[3]) * 4096) + (((int) $endDate[4]) * 64) + ((int) $endDate[5]);
3135
+            $newmessageprops[$this->proptags['end_recur_date']] = (((int)$endDate[0]) * 512) + (((int)$endDate[1]) * 32) + ((int)$endDate[2]);
3136
+            $newmessageprops[$this->proptags['end_recur_time']] = (((int)$endDate[3]) * 4096) + (((int)$endDate[4]) * 64) + ((int)$endDate[5]);
3137 3137
         }
3138 3138
     }
3139 3139
 
@@ -3155,16 +3155,16 @@  discard block
 block discarded – undo
3155 3155
         $outgoing = mapi_folder_createmessage($outbox);
3156 3156
 
3157 3157
         // check if $store is set and it is not equal to $defaultStore (means its the delegation case)
3158
-        if($store !== false) {
3158
+        if ($store !== false) {
3159 3159
             $storeProps = mapi_getprops($store, array(PR_ENTRYID));
3160 3160
             $userStoreProps = mapi_getprops($userStore, array(PR_ENTRYID));
3161 3161
 
3162 3162
             // @FIXME use entryid comparison functions here
3163
-            if($storeProps[PR_ENTRYID] !== $userStoreProps[PR_ENTRYID]) {
3163
+            if ($storeProps[PR_ENTRYID] !== $userStoreProps[PR_ENTRYID]) {
3164 3164
                 // get the delegator properties and set it into outgoing mail
3165 3165
                 $delegatorDetails = $this->getOwnerAddress($store, false);
3166 3166
 
3167
-                if($delegatorDetails) {
3167
+                if ($delegatorDetails) {
3168 3168
                     list($ownername, $owneremailaddr, $owneraddrtype, $ownerentryid, $ownersearchkey) = $delegatorDetails;
3169 3169
                     $sentprops[PR_SENT_REPRESENTING_EMAIL_ADDRESS] = $owneremailaddr;
3170 3170
                     $sentprops[PR_SENT_REPRESENTING_NAME] = $ownername;
@@ -3176,7 +3176,7 @@  discard block
 block discarded – undo
3176 3176
                 // get the delegate properties and set it into outgoing mail
3177 3177
                 $delegateDetails = $this->getOwnerAddress($userStore, false);
3178 3178
 
3179
-                if($delegateDetails) {
3179
+                if ($delegateDetails) {
3180 3180
                     list($ownername, $owneremailaddr, $owneraddrtype, $ownerentryid, $ownersearchkey) = $delegateDetails;
3181 3181
                     $sentprops[PR_SENDER_EMAIL_ADDRESS] = $owneremailaddr;
3182 3182
                     $sentprops[PR_SENDER_NAME] = $ownername;
@@ -3189,7 +3189,7 @@  discard block
 block discarded – undo
3189 3189
             // normal user is sending mail, so both set of properties will be same
3190 3190
             $userDetails = $this->getOwnerAddress($userStore);
3191 3191
 
3192
-            if($userDetails) {
3192
+            if ($userDetails) {
3193 3193
                 list($ownername, $owneremailaddr, $owneraddrtype, $ownerentryid, $ownersearchkey) = $userDetails;
3194 3194
                 $sentprops[PR_SENT_REPRESENTING_EMAIL_ADDRESS] = $owneremailaddr;
3195 3195
                 $sentprops[PR_SENT_REPRESENTING_NAME] = $ownername;
@@ -3224,7 +3224,7 @@  discard block
 block discarded – undo
3224 3224
 
3225 3225
         $props = mapi_getprops($this->message, array(PR_MESSAGE_CLASS, $this->proptags['goid'], $this->proptags['goid2'], $this->proptags['updatecounter'], $this->proptags['meetingtype'], $this->proptags['owner_critical_change']));
3226 3226
 
3227
-        if(!$this->isMeetingRequest($props[PR_MESSAGE_CLASS])) {
3227
+        if (!$this->isMeetingRequest($props[PR_MESSAGE_CLASS])) {
3228 3228
             return $result;
3229 3229
         }
3230 3230
 
@@ -3239,10 +3239,10 @@  discard block
 block discarded – undo
3239 3239
 
3240 3240
         // if basedate is provided and we could not find the item then it could be that we are checking
3241 3241
         // an exception so get the exception and check it
3242
-        if($basedate && $calendarItem !== false) {
3242
+        if ($basedate && $calendarItem !== false) {
3243 3243
             $exception = $this->getExceptionItem($calendarItem, $basedate);
3244 3244
 
3245
-            if($exception !== false) {
3245
+            if ($exception !== false) {
3246 3246
                 // we are able to find the exception compare with it
3247 3247
                 $calendarItem = $exception;
3248 3248
             } else {
@@ -3252,7 +3252,7 @@  discard block
 block discarded – undo
3252 3252
             }
3253 3253
         }
3254 3254
 
3255
-        if($calendarItem !== false) {
3255
+        if ($calendarItem !== false) {
3256 3256
             $calendarItemProps = mapi_getprops($calendarItem, array(
3257 3257
                                                     $this->proptags['owner_critical_change'],
3258 3258
                                                     $this->proptags['updatecounter']
@@ -3262,7 +3262,7 @@  discard block
 block discarded – undo
3262 3262
 
3263 3263
             $criticalChange = (isset($calendarItemProps[$this->proptags['owner_critical_change']]) && $props[$this->proptags['owner_critical_change']] < $calendarItemProps[$this->proptags['owner_critical_change']]);
3264 3264
 
3265
-            if($updateCounter || $criticalChange) {
3265
+            if ($updateCounter || $criticalChange) {
3266 3266
                 // meeting request is out of date, set properties to indicate this
3267 3267
                 mapi_setprops($this->message, array($this->proptags['meetingtype'] => mtgOutOfDate, PR_ICON_INDEX => 1033));
3268 3268
                 mapi_savechanges($this->message);
@@ -3285,18 +3285,18 @@  discard block
 block discarded – undo
3285 3285
 
3286 3286
         $props = mapi_getprops($this->message, array(PR_MESSAGE_CLASS, $this->proptags['updatecounter']));
3287 3287
 
3288
-        if(!$this->isMeetingRequestResponse($props[PR_MESSAGE_CLASS])) {
3288
+        if (!$this->isMeetingRequestResponse($props[PR_MESSAGE_CLASS])) {
3289 3289
             return $result;
3290 3290
         }
3291 3291
 
3292 3292
         $calendarItem = $this->getCorrespondentCalendarItem(true);
3293 3293
 
3294
-        if($calendarItem !== false) {
3294
+        if ($calendarItem !== false) {
3295 3295
             // basedate is provided so open exception
3296
-            if($basedate !== false) {
3296
+            if ($basedate !== false) {
3297 3297
                 $exception = $this->getExceptionItem($calendarItem, $basedate);
3298 3298
 
3299
-                if($exception !== false) {
3299
+                if ($exception !== false) {
3300 3300
                     // we are able to find the exception compare with it
3301 3301
                     $calendarItem = $exception;
3302 3302
                 } else {
@@ -3306,15 +3306,15 @@  discard block
 block discarded – undo
3306 3306
                 }
3307 3307
             }
3308 3308
 
3309
-            if($calendarItem !== false) {
3309
+            if ($calendarItem !== false) {
3310 3310
                 $calendarItemProps = mapi_getprops($calendarItem, array($this->proptags['updatecounter']));
3311 3311
 
3312 3312
                 /*
3313 3313
                  * if(message_counter < appointment_counter) meeting object is newer then meeting response (meeting is updated)
3314 3314
                  * if(message_counter >= appointment_counter) meeting is not updated, do normal processing
3315 3315
                  */
3316
-                if(isset($calendarItemProps[$this->proptags['updatecounter']], $props[$this->proptags['updatecounter']])) {
3317
-                    if($props[$this->proptags['updatecounter']] < $calendarItemProps[$this->proptags['updatecounter']]) {
3316
+                if (isset($calendarItemProps[$this->proptags['updatecounter']], $props[$this->proptags['updatecounter']])) {
3317
+                    if ($props[$this->proptags['updatecounter']] < $calendarItemProps[$this->proptags['updatecounter']]) {
3318 3318
                         $result = true;
3319 3319
                     }
3320 3320
                 }
@@ -3342,9 +3342,9 @@  discard block
 block discarded – undo
3342 3342
         $attach = null;
3343 3343
 
3344 3344
         // If basedate is specified then we need to open exception message to clear recipient responses
3345
-        if($basedate) {
3345
+        if ($basedate) {
3346 3346
             $recurrence = new Recurrence($this->store, $this->message);
3347
-            if($recurrence->isException($basedate)){
3347
+            if ($recurrence->isException($basedate)) {
3348 3348
                 $attach = $recurrence->getExceptionAttachment($basedate);
3349 3349
                 if ($attach) {
3350 3350
                     $message = mapi_attach_openobj($attach, MAPI_MODIFY);
@@ -3355,14 +3355,14 @@  discard block
 block discarded – undo
3355 3355
             $message = $this->message;
3356 3356
         }
3357 3357
 
3358
-        if(!$message) {
3358
+        if (!$message) {
3359 3359
             return;
3360 3360
         }
3361 3361
 
3362 3362
         $newProps = mapi_getprops($message, array($this->proptags['startdate'], $this->proptags['duedate'], $this->proptags['updatecounter']));
3363 3363
 
3364 3364
         // Check whether message is updated or not.
3365
-        if(isset($newProps[$this->proptags['updatecounter']]) && $newProps[$this->proptags['updatecounter']] == 0) {
3365
+        if (isset($newProps[$this->proptags['updatecounter']]) && $newProps[$this->proptags['updatecounter']] == 0) {
3366 3366
             return;
3367 3367
         }
3368 3368
 
@@ -3389,8 +3389,8 @@  discard block
 block discarded – undo
3389 3389
         $recipTable = mapi_message_getrecipienttable($message);
3390 3390
         $recipsRows = mapi_table_queryallrows($recipTable, $this->recipprops);
3391 3391
 
3392
-        foreach($recipsRows as $recipient) {
3393
-            if(($recipient[PR_RECIPIENT_FLAGS] & recipOrganizer) != recipOrganizer){
3392
+        foreach ($recipsRows as $recipient) {
3393
+            if (($recipient[PR_RECIPIENT_FLAGS] & recipOrganizer) != recipOrganizer) {
3394 3394
                 // Recipient is attendee, set the trackstatus to 'Not Responded'
3395 3395
                 $recipient[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone;
3396 3396
             } else {
@@ -3416,7 +3416,7 @@  discard block
 block discarded – undo
3416 3416
     {
3417 3417
         $props = mapi_getprops($this->message, array(PR_MESSAGE_CLASS, $this->proptags['goid'], $this->proptags['goid2'], PR_RCVD_REPRESENTING_ENTRYID));
3418 3418
 
3419
-        if(!$this->isMeetingRequest($props[PR_MESSAGE_CLASS]) && !$this->isMeetingRequestResponse($props[PR_MESSAGE_CLASS]) && !$this->isMeetingCancellation($props[PR_MESSAGE_CLASS])) {
3419
+        if (!$this->isMeetingRequest($props[PR_MESSAGE_CLASS]) && !$this->isMeetingRequestResponse($props[PR_MESSAGE_CLASS]) && !$this->isMeetingCancellation($props[PR_MESSAGE_CLASS])) {
3420 3420
             // can work only with meeting requests/responses/cancellations
3421 3421
             return false;
3422 3422
         }
@@ -3454,9 +3454,9 @@  discard block
 block discarded – undo
3454 3454
         }
3455 3455
 
3456 3456
         // there should be only one item returned
3457
-        if(!empty($entryids) && count($entryids) === 1) {
3457
+        if (!empty($entryids) && count($entryids) === 1) {
3458 3458
             // return only entryid
3459
-            if($open === false) {
3459
+            if ($open === false) {
3460 3460
                 return $entryids[0];
3461 3461
             }
3462 3462
 
@@ -3482,11 +3482,11 @@  discard block
 block discarded – undo
3482 3482
         $props = mapi_getprops($this->message, array(PR_RCVD_REPRESENTING_ENTRYID, $this->proptags['recurring']));
3483 3483
 
3484 3484
         // check if the passed item is recurring series
3485
-        if($props[$this->proptags['recurring']] !== false) {
3485
+        if ($props[$this->proptags['recurring']] !== false) {
3486 3486
             return false;
3487 3487
         }
3488 3488
 
3489
-        if($store === false) {
3489
+        if ($store === false) {
3490 3490
             // If Delegate is processing Meeting Request/Response for Delegator then retrieve Delegator's store and calendar.
3491 3491
             if (isset($props[PR_RCVD_REPRESENTING_ENTRYID])) {
3492 3492
                 $delegatorStore = $this->getDelegatorStore($props[PR_RCVD_REPRESENTING_ENTRYID]);
@@ -3498,7 +3498,7 @@  discard block
 block discarded – undo
3498 3498
 
3499 3499
         $recurr = new Recurrence($store, $recurringMessage);
3500 3500
         $attach = $recurr->getExceptionAttachment($basedate);
3501
-        if($attach) {
3501
+        if ($attach) {
3502 3502
             $occurItem = mapi_attach_openobj($attach);
3503 3503
         }
3504 3504
 
@@ -3519,7 +3519,7 @@  discard block
 block discarded – undo
3519 3519
         $returnValue = false;
3520 3520
         $noOfInstances = 0;
3521 3521
 
3522
-        if($message === false) {
3522
+        if ($message === false) {
3523 3523
             $message = $this->message;
3524 3524
         }
3525 3525
 
@@ -3538,7 +3538,7 @@  discard block
 block discarded – undo
3538 3538
                 )
3539 3539
         );
3540 3540
 
3541
-        if($userStore === false) {
3541
+        if ($userStore === false) {
3542 3542
             $userStore = $this->store;
3543 3543
 
3544 3544
             // check if delegate is processing the response
@@ -3550,16 +3550,16 @@  discard block
 block discarded – undo
3550 3550
             }
3551 3551
         }
3552 3552
 
3553
-        if($calFolder === false) {
3553
+        if ($calFolder === false) {
3554 3554
             $calFolder = $this->openDefaultCalendar($userStore);
3555 3555
         }
3556 3556
 
3557
-        if($calFolder) {
3557
+        if ($calFolder) {
3558 3558
             // Meeting request is recurring, so get all occurrence and check for each occurrence whether it conflicts with other appointments in Calendar.
3559 3559
             if (isset($messageProps[$this->proptags['recurring']]) && $messageProps[$this->proptags['recurring']] === true) {
3560 3560
                 // Apply recurrence class and retrieve all occurrences(max: 30 occurrence because recurrence can also be set as 'no end date')
3561 3561
                 $recurr = new Recurrence($userStore, $message);
3562
-                $items = $recurr->getItems($messageProps[$this->proptags['clipstart']], $messageProps[$this->proptags['clipend']] * (24*24*60), 30);
3562
+                $items = $recurr->getItems($messageProps[$this->proptags['clipstart']], $messageProps[$this->proptags['clipend']] * (24 * 24 * 60), 30);
3563 3563
 
3564 3564
                 foreach ($items as $item) {
3565 3565
                     // Get all items in the timeframe that we want to book, and get the goid and busystatus for each item
@@ -3571,7 +3571,7 @@  discard block
 block discarded – undo
3571 3571
                              * Only meeting requests have globalID, normal appointments do not have globalID
3572 3572
                              * so if any normal appointment if found then it is assumed to be conflict.
3573 3573
                              */
3574
-                            if(isset($calendarItem[$this->proptags['goid']])) {
3574
+                            if (isset($calendarItem[$this->proptags['goid']])) {
3575 3575
                                 if ($calendarItem[$this->proptags['goid']] !== $messageProps[$this->proptags['goid']]) {
3576 3576
                                     $noOfInstances++;
3577 3577
                                     break;
@@ -3584,14 +3584,14 @@  discard block
 block discarded – undo
3584 3584
                     }
3585 3585
                 }
3586 3586
 
3587
-                if($noOfInstances > 0) {
3587
+                if ($noOfInstances > 0) {
3588 3588
                     $returnValue = $noOfInstances;
3589 3589
                 }
3590 3590
             } else {
3591 3591
                 // Get all items in the timeframe that we want to book, and get the goid and busystatus for each item
3592 3592
                 $items = getCalendarItems($userStore, $calFolder, $messageProps[$this->proptags['startdate']], $messageProps[$this->proptags['duedate']], array($this->proptags['goid'], $this->proptags['busystatus']));
3593 3593
 
3594
-                if(isset($messageProps[$this->proptags['basedate']]) && !empty($messageProps[$this->proptags['basedate']])) {
3594
+                if (isset($messageProps[$this->proptags['basedate']]) && !empty($messageProps[$this->proptags['basedate']])) {
3595 3595
                     $basedate = $messageProps[$this->proptags['basedate']];
3596 3596
                     // Get the goid2 from recurring MR which further used to
3597 3597
                     // check the resource conflicts item.
@@ -3600,9 +3600,9 @@  discard block
 block discarded – undo
3600 3600
                     $messageProps[$this->proptags['goid2']] = $recurrItemProps[$this->proptags['goid2']];
3601 3601
                 }
3602 3602
 
3603
-                foreach($items as $item) {
3603
+                foreach ($items as $item) {
3604 3604
                     if ($item[$this->proptags['busystatus']] !== fbFree) {
3605
-                        if(isset($item[$this->proptags['goid']])) {
3605
+                        if (isset($item[$this->proptags['goid']])) {
3606 3606
                             if (($item[$this->proptags['goid']] !== $messageProps[$this->proptags['goid']])
3607 3607
                                 && ($item[$this->proptags['goid']] !== $messageProps[$this->proptags['goid2']])) {
3608 3608
                                 $returnValue = true;
@@ -3632,12 +3632,12 @@  discard block
 block discarded – undo
3632 3632
     {
3633 3633
         $hasDelegator = false;
3634 3634
         // Check if meeting already has an organizer.
3635
-        foreach ($recipients as $key => $recipient){
3635
+        foreach ($recipients as $key => $recipient) {
3636 3636
             if (isset($messageProps[PR_RCVD_REPRESENTING_EMAIL_ADDRESS]) && $recipient[PR_EMAIL_ADDRESS] == $messageProps[PR_RCVD_REPRESENTING_EMAIL_ADDRESS])
3637 3637
                 $hasDelegator = true;
3638 3638
         }
3639 3639
 
3640
-        if (!$hasDelegator){
3640
+        if (!$hasDelegator) {
3641 3641
             // Create delegator.
3642 3642
             $delegator = array();
3643 3643
             $delegator[PR_ENTRYID] = $messageProps[PR_RCVD_REPRESENTING_ENTRYID];
@@ -3645,7 +3645,7 @@  discard block
 block discarded – undo
3645 3645
             $delegator[PR_EMAIL_ADDRESS] = $messageProps[PR_RCVD_REPRESENTING_EMAIL_ADDRESS];
3646 3646
             $delegator[PR_RECIPIENT_TYPE] = MAPI_TO;
3647 3647
             $delegator[PR_RECIPIENT_DISPLAY_NAME] = $messageProps[PR_RCVD_REPRESENTING_NAME];
3648
-            $delegator[PR_ADDRTYPE] = empty($messageProps[PR_RCVD_REPRESENTING_ADDRTYPE]) ? 'SMTP':$messageProps[PR_RCVD_REPRESENTING_ADDRTYPE];
3648
+            $delegator[PR_ADDRTYPE] = empty($messageProps[PR_RCVD_REPRESENTING_ADDRTYPE]) ? 'SMTP' : $messageProps[PR_RCVD_REPRESENTING_ADDRTYPE];
3649 3649
             $delegator[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone;
3650 3650
             $delegator[PR_RECIPIENT_FLAGS] = recipSendable;
3651 3651
             $delegator[PR_SEARCH_KEY] = $messageProps[PR_RCVD_REPRESENTING_SEARCH_KEY];
@@ -3668,19 +3668,19 @@  discard block
 block discarded – undo
3668 3668
         $delegatorStore = $this->openCustomUserStore($receivedRepresentingEntryId);
3669 3669
         $returnData['store'] = $delegatorStore;
3670 3670
 
3671
-        if(!empty($foldersToOpen)) {
3672
-            for($index = 0, $len = count($foldersToOpen); $index < $len; $index++) {
3671
+        if (!empty($foldersToOpen)) {
3672
+            for ($index = 0, $len = count($foldersToOpen); $index < $len; $index++) {
3673 3673
                 $folderType = $foldersToOpen[$index];
3674 3674
 
3675 3675
                 // first try with default folders
3676 3676
                 $folder = $this->openDefaultFolder($folderType, $delegatorStore);
3677 3677
 
3678 3678
                 // if folder not found then try with base folders
3679
-                if($folder === false) {
3679
+                if ($folder === false) {
3680 3680
                     $folder = $this->openBaseFolder($folderType, $delegatorStore);
3681 3681
                 }
3682 3682
 
3683
-                if($folder === false) {
3683
+                if ($folder === false) {
3684 3684
                     // we are still not able to get the folder so give up
3685 3685
                     continue;
3686 3686
                 }
@@ -3728,7 +3728,7 @@  discard block
 block discarded – undo
3728 3728
         $recurrence = new Recurrence($store, $calendarItem);
3729 3729
 
3730 3730
         //Retrieve all occurrences(max: 30 occurrence because recurrence can also be set as 'no end date')
3731
-        $items = $recurrence->getItems($calendarItemProps[$this->proptags['clipstart']], $calendarItemProps[$this->proptags['clipend']] * (24*24*60), 30);
3731
+        $items = $recurrence->getItems($calendarItemProps[$this->proptags['clipstart']], $calendarItemProps[$this->proptags['clipend']] * (24 * 24 * 60), 30);
3732 3732
         $localCategories = array();
3733 3733
 
3734 3734
         foreach ($items as $item) {
Please login to merge, or discard this patch.
Braces   +59 added lines, -44 removed lines patch added patch discarded remove patch
@@ -278,11 +278,13 @@  discard block
 block discarded – undo
278 278
      */
279 279
     function processMeetingRequestResponse()
280 280
     {
281
-        if(!$this->isMeetingRequestResponse())
282
-            return;
281
+        if(!$this->isMeetingRequestResponse()) {
282
+                    return;
283
+        }
283 284
 
284
-        if(!$this->isLocalOrganiser())
285
-            return;
285
+        if(!$this->isLocalOrganiser()) {
286
+                    return;
287
+        }
286 288
 
287 289
         // Get information we need from the response message
288 290
         $messageprops = mapi_getprops($this->message, Array(
@@ -449,8 +451,9 @@  discard block
 block discarded – undo
449 451
 
450 452
                 mapi_message_modifyrecipients($calendarItem, MODRECIP_MODIFY, Array($recipient));
451 453
             }
452
-            if(isset($recipient[PR_RECIPIENT_TRACKSTATUS]) && $recipient[PR_RECIPIENT_TRACKSTATUS] == olRecipientTrackStatusAccepted)
453
-                $acceptedrecips++;
454
+            if(isset($recipient[PR_RECIPIENT_TRACKSTATUS]) && $recipient[PR_RECIPIENT_TRACKSTATUS] == olRecipientTrackStatusAccepted) {
455
+                            $acceptedrecips++;
456
+            }
454 457
         }
455 458
 
456 459
         // If the recipient was not found in the original calendar item,
@@ -489,7 +492,7 @@  discard block
 block discarded – undo
489 492
             $props = Array();
490 493
             if($messageprops[$this->proptags['counter_proposal']]){
491 494
                 $props[$this->proptags['counter_proposal']] = true;
492
-            }else{
495
+            } else{
493 496
                 $props[$this->proptags['counter_proposal']] = false;
494 497
             }
495 498
 
@@ -1029,8 +1032,7 @@  discard block
 block discarded – undo
1029 1032
                                                         )
1030 1033
                                         );
1031 1034
                             $recipients = mapi_table_queryallrows($recipientTable, $this->recipprops, $res);
1032
-                        } 
1033
-                        else {
1035
+                        } else {
1034 1036
                             $recipients = mapi_table_queryallrows($recipientTable, $this->recipprops);
1035 1037
                         }
1036 1038
                         $this->addOrganizer($props, $recipients);
@@ -1042,8 +1044,7 @@  discard block
 block discarded – undo
1042 1044
                     }
1043 1045
                 }
1044 1046
             }
1045
-        } 
1046
-        else {
1047
+        } else {
1047 1048
             // Here only properties are set on calendaritem, because user is responding from calendar.
1048 1049
             $props = array();
1049 1050
             $props[$this->proptags['responsestatus']] = $tentative ? olResponseTentative : olResponseAccepted;
@@ -1382,8 +1383,9 @@  discard block
 block discarded – undo
1382 1383
         // Length of the random data
1383 1384
         $goid .= pack('V', 16);
1384 1385
         // Random data.
1385
-        for ($i=0; $i<16; $i++)
1386
-            $goid .= chr(rand(0, 255));
1386
+        for ($i=0; $i<16; $i++) {
1387
+                    $goid .= chr(rand(0, 255));
1388
+        }
1387 1389
 
1388 1390
         // Create a new appointment id for this item
1389 1391
         $apptid = rand();
@@ -1494,7 +1496,7 @@  discard block
 block discarded – undo
1494 1496
                 'error' => $this->errorSetResource,
1495 1497
                 'displayname' => $this->recipientDisplayname
1496 1498
             );
1497
-        }else{
1499
+        } else{
1498 1500
             return true;
1499 1501
         }
1500 1502
     }
@@ -1993,8 +1995,9 @@  discard block
 block discarded – undo
1993 1995
         $props[PR_SUBJECT] = $subjectprefix . ': ' . $messageprops[PR_SUBJECT];
1994 1996
 
1995 1997
         $props[PR_MESSAGE_CLASS] = 'IPM.Schedule.Meeting.Resp.' . $classpostfix;
1996
-        if(isset($messageprops[PR_OWNER_APPT_ID]))
1997
-            $props[PR_OWNER_APPT_ID] = $messageprops[PR_OWNER_APPT_ID];
1998
+        if(isset($messageprops[PR_OWNER_APPT_ID])) {
1999
+                    $props[PR_OWNER_APPT_ID] = $messageprops[PR_OWNER_APPT_ID];
2000
+        }
1998 2001
 
1999 2002
         // Set GlobalId AND CleanGlobalId, if exception then also set basedate into GlobalId(0x3).
2000 2003
         $props[$this->proptags['goid']] = $this->setBasedateInGlobalID($messageprops[$this->proptags['goid2']], $basedate);
@@ -2061,8 +2064,9 @@  discard block
 block discarded – undo
2061 2064
 
2062 2065
         $rows = mapi_table_queryallrows($calendarcontents, Array(PR_ENTRYID), $restrict);
2063 2066
 
2064
-        if(empty($rows))
2065
-            return;
2067
+        if(empty($rows)) {
2068
+                    return;
2069
+        }
2066 2070
 
2067 2071
         $calendaritems = Array();
2068 2072
 
@@ -2128,8 +2132,9 @@  discard block
 block discarded – undo
2128 2132
      */
2129 2133
     function getOwnerAddress($store, $fallbackToLoggedInUser = true)
2130 2134
     {
2131
-        if(!$this->session)
2132
-            return false;
2135
+        if(!$this->session) {
2136
+                    return false;
2137
+        }
2133 2138
 
2134 2139
         $storeProps = mapi_getprops($store, array(PR_MAILBOX_OWNER_ENTRYID, PR_USER_ENTRYID));
2135 2140
 
@@ -2146,8 +2151,9 @@  discard block
 block discarded – undo
2146 2151
             $ab = mapi_openaddressbook($this->session);
2147 2152
 
2148 2153
             $zarafaUser = mapi_ab_openentry($ab, $ownerEntryId);
2149
-            if(!$zarafaUser)
2150
-                return false;
2154
+            if(!$zarafaUser) {
2155
+                            return false;
2156
+            }
2151 2157
 
2152 2158
             $ownerProps = mapi_getprops($zarafaUser, array(PR_ADDRTYPE, PR_DISPLAY_NAME, PR_EMAIL_ADDRESS, PR_SEARCH_KEY));
2153 2159
 
@@ -2176,8 +2182,9 @@  discard block
 block discarded – undo
2176 2182
             }
2177 2183
         }
2178 2184
 
2179
-        if(!$entryid)
2180
-            return false;
2185
+        if(!$entryid) {
2186
+                    return false;
2187
+        }
2181 2188
 
2182 2189
         return mapi_openmsgstore($this->session, $entryid);
2183 2190
     }
@@ -2248,10 +2255,11 @@  discard block
 block discarded – undo
2248 2255
         $month = hexdec(substr($hexbase, 4, 2));
2249 2256
         $year = hexdec(substr($hexbase, 0, 4));
2250 2257
 
2251
-        if ($day && $month && $year)
2252
-            return gmmktime(0, 0, 0, $month, $day, $year);
2253
-        else
2254
-            return false;
2258
+        if ($day && $month && $year) {
2259
+                    return gmmktime(0, 0, 0, $month, $day, $year);
2260
+        } else {
2261
+                    return false;
2262
+        }
2255 2263
     }
2256 2264
 
2257 2265
     /**
@@ -2449,7 +2457,7 @@  discard block
 block discarded – undo
2449 2457
                          */
2450 2458
                         //$errorSetResource = 2;
2451 2459
                         $this->nonAcceptingResources[] = $resourceRecipients[$i];
2452
-                    }else{
2460
+                    } else{
2453 2461
                         if($declineRecurringMeetingRequests && !$cancel){
2454 2462
                             // Check if appointment is recurring
2455 2463
                             if($messageprops[ $this->proptags['recurring'] ]){
@@ -2506,9 +2514,10 @@  discard block
 block discarded – undo
2506 2514
                     }
2507 2515
 
2508 2516
                     // Still no results found. I giveup, create new message.
2509
-                    if (!$newResourceMsg)
2510
-                        $newResourceMsg = mapi_folder_createmessage($calFolder);
2511
-                }else{
2517
+                    if (!$newResourceMsg) {
2518
+                                            $newResourceMsg = mapi_folder_createmessage($calFolder);
2519
+                    }
2520
+                } else{
2512 2521
                     $newResourceMsg = mapi_msgstore_openentry($userStore, $rows[0]);
2513 2522
                 }
2514 2523
 
@@ -2600,10 +2609,11 @@  discard block
 block discarded – undo
2600 2609
                     $this->addOrganizer($messageprops, $recips, true);
2601 2610
 
2602 2611
                     // Update occurrence
2603
-                    if($recurr->isException($basedate))
2604
-                        $recurr->modifyException($messageprops, $basedate, $recips);
2605
-                    else
2606
-                        $recurr->createException($messageprops, $basedate, false, $recips);
2612
+                    if($recurr->isException($basedate)) {
2613
+                                            $recurr->modifyException($messageprops, $basedate, $recips);
2614
+                    } else {
2615
+                                            $recurr->createException($messageprops, $basedate, false, $recips);
2616
+                    }
2607 2617
                 } else {
2608 2618
 
2609 2619
                     mapi_setprops($newResourceMsg, $messageprops);
@@ -2629,7 +2639,7 @@  discard block
 block discarded – undo
2629 2639
                     'msg' => $newResourceMsg,
2630 2640
                 );
2631 2641
                 $this->includesResources = true;
2632
-            }else{
2642
+            } else{
2633 2643
                 /**
2634 2644
                  * If no other errors occurred and you have no access to the
2635 2645
                  * folder of the resource, throw an error=1.
@@ -2839,7 +2849,9 @@  discard block
 block discarded – undo
2839 2849
             $newmessageprops[$this->proptags['is_exception']] = true;
2840 2850
 
2841 2851
             // Set to high importance
2842
-            if($cancel) $newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH;
2852
+            if($cancel) {
2853
+                $newmessageprops[PR_IMPORTANCE] = IMPORTANCE_HIGH;
2854
+            }
2843 2855
 
2844 2856
             // Set startdate and enddate of exception
2845 2857
             if ($cancel && $recurObject) {
@@ -2906,8 +2918,9 @@  discard block
 block discarded – undo
2906 2918
 
2907 2919
         $meetingTimeInfo = $this->getMeetingTimeInfo();
2908 2920
 
2909
-        if($meetingTimeInfo)
2910
-            $newmessageprops[PR_BODY] = $meetingTimeInfo;
2921
+        if($meetingTimeInfo) {
2922
+                    $newmessageprops[PR_BODY] = $meetingTimeInfo;
2923
+        }
2911 2924
 
2912 2925
         // Send all recurrence info in mail, if this is a recurrence meeting.
2913 2926
         if (isset($messageprops[$this->proptags['recurring']]) && $messageprops[$this->proptags['recurring']]) {
@@ -2928,8 +2941,9 @@  discard block
 block discarded – undo
2928 2941
         }
2929 2942
 
2930 2943
         // Prefix the subject if needed
2931
-        if ($prefix && isset($newmessageprops[PR_SUBJECT]))
2932
-            $newmessageprops[PR_SUBJECT] = $prefix . $newmessageprops[PR_SUBJECT];
2944
+        if ($prefix && isset($newmessageprops[PR_SUBJECT])) {
2945
+                    $newmessageprops[PR_SUBJECT] = $prefix . $newmessageprops[PR_SUBJECT];
2946
+        }
2933 2947
 
2934 2948
         if(isset($newmessageprops[$this->proptags['categories']]) &&
2935 2949
             !empty($newmessageprops[$this->proptags['categories']])) {
@@ -3633,8 +3647,9 @@  discard block
 block discarded – undo
3633 3647
         $hasDelegator = false;
3634 3648
         // Check if meeting already has an organizer.
3635 3649
         foreach ($recipients as $key => $recipient){
3636
-            if (isset($messageProps[PR_RCVD_REPRESENTING_EMAIL_ADDRESS]) && $recipient[PR_EMAIL_ADDRESS] == $messageProps[PR_RCVD_REPRESENTING_EMAIL_ADDRESS])
3637
-                $hasDelegator = true;
3650
+            if (isset($messageProps[PR_RCVD_REPRESENTING_EMAIL_ADDRESS]) && $recipient[PR_EMAIL_ADDRESS] == $messageProps[PR_RCVD_REPRESENTING_EMAIL_ADDRESS]) {
3651
+                            $hasDelegator = true;
3652
+            }
3638 3653
         }
3639 3654
 
3640 3655
         if (!$hasDelegator){
Please login to merge, or discard this patch.