@@ -1052,8 +1052,8 @@ |
||
| 1052 | 1052 | $messageProps = mapi_getprops($message, [PR_SUBJECT, PR_MESSAGE_CLASS]); |
| 1053 | 1053 | $cls = $messageProps[PR_MESSAGE_CLASS]; |
| 1054 | 1054 | $isSupportedMessage = class_match_prefix($cls, "IPM.Note") || |
| 1055 | - class_match_prefix($cls, "Report.IPM.Note") || |
|
| 1056 | - class_match_prefix($cls, "IPM.Schedule"); |
|
| 1055 | + class_match_prefix($cls, "Report.IPM.Note") || |
|
| 1056 | + class_match_prefix($cls, "IPM.Schedule"); |
|
| 1057 | 1057 | |
| 1058 | 1058 | if ($isSupportedMessage) { |
| 1059 | 1059 | // Get addressbook for current session |
@@ -775,7 +775,7 @@ |
||
| 775 | 775 | return; |
| 776 | 776 | } |
| 777 | 777 | if (!class_match_prefix($messageClass, "IPM.Note.deferSMIME") && |
| 778 | - !class_match_prefix($messageClass, "IPM.Note.SMIME")) |
|
| 778 | + !class_match_prefix($messageClass, "IPM.Note.SMIME")) |
|
| 779 | 779 | return; |
| 780 | 780 | |
| 781 | 781 | // FIXME: for now return when we are going to sign but we don't have the passphrase set |
@@ -775,8 +775,9 @@ |
||
| 775 | 775 | return; |
| 776 | 776 | } |
| 777 | 777 | if (!class_match_prefix($messageClass, "IPM.Note.deferSMIME") && |
| 778 | - !class_match_prefix($messageClass, "IPM.Note.SMIME")) |
|
| 779 | - return; |
|
| 778 | + !class_match_prefix($messageClass, "IPM.Note.SMIME")) { |
|
| 779 | + return; |
|
| 780 | + } |
|
| 780 | 781 | |
| 781 | 782 | // FIXME: for now return when we are going to sign but we don't have the passphrase set |
| 782 | 783 | // This should never happen sign |
@@ -588,7 +588,7 @@ |
||
| 588 | 588 | // deleting an attachment removes an actual attachment of the message |
| 589 | 589 | $mprops = mapi_getprops($message, [PR_MESSAGE_CLASS]); |
| 590 | 590 | if (isSmimePluginEnabled() && |
| 591 | - class_match_prefix($mprops[PR_MESSAGE_CLASS], "IPM.Note.SMIME")) |
|
| 591 | + class_match_prefix($mprops[PR_MESSAGE_CLASS], "IPM.Note.SMIME")) |
|
| 592 | 592 | mapi_message_deleteattach($message, $attnum); |
| 593 | 593 | |
| 594 | 594 | $decapRcptTable = mapi_message_getrecipienttable($message); |
@@ -588,8 +588,9 @@ discard block |
||
| 588 | 588 | // deleting an attachment removes an actual attachment of the message |
| 589 | 589 | $mprops = mapi_getprops($message, [PR_MESSAGE_CLASS]); |
| 590 | 590 | if (isSmimePluginEnabled() && |
| 591 | - class_match_prefix($mprops[PR_MESSAGE_CLASS], "IPM.Note.SMIME")) |
|
| 592 | - mapi_message_deleteattach($message, $attnum); |
|
| 591 | + class_match_prefix($mprops[PR_MESSAGE_CLASS], "IPM.Note.SMIME")) { |
|
| 592 | + mapi_message_deleteattach($message, $attnum); |
|
| 593 | + } |
|
| 593 | 594 | |
| 594 | 595 | $decapRcptTable = mapi_message_getrecipienttable($message); |
| 595 | 596 | $decapRecipients = mapi_table_queryallrows($decapRcptTable, $GLOBALS["properties"]->getRecipientProperties()); |
@@ -1017,13 +1018,14 @@ discard block |
||
| 1017 | 1018 | * @h: PR_MESSAGE_CLASS value |
| 1018 | 1019 | * @n: prefix to test for |
| 1019 | 1020 | */ |
| 1020 | -function class_match_prefix($h, $n) |
|
| 1021 | -{ |
|
| 1022 | - if (!isset($h)) |
|
| 1023 | - return false; |
|
| 1021 | +function class_match_prefix($h, $n) { |
|
| 1022 | + if (!isset($h)) { |
|
| 1023 | + return false; |
|
| 1024 | + } |
|
| 1024 | 1025 | $z = strlen($n); |
| 1025 | 1026 | $r = strncasecmp($h, $n, $z); |
| 1026 | - if ($r != 0) |
|
| 1027 | - return false; |
|
| 1027 | + if ($r != 0) { |
|
| 1028 | + return false; |
|
| 1029 | + } |
|
| 1028 | 1030 | return strlen($h) == $z || $h[$z] == '.' ? true : false; |
| 1029 | 1031 | } |
@@ -78,9 +78,10 @@ discard block |
||
| 78 | 78 | // Check if message is distlist then we need to use different set of properties |
| 79 | 79 | $props = mapi_getprops($message, [PR_MESSAGE_CLASS]); |
| 80 | 80 | |
| 81 | - if (class_match_prefix($props[PR_MESSAGE_CLASS], "IPM.Distlist")) |
|
| 82 | - // for distlist we need to use different set of properties |
|
| 81 | + if (class_match_prefix($props[PR_MESSAGE_CLASS], "IPM.Distlist")) { |
|
| 82 | + // for distlist we need to use different set of properties |
|
| 83 | 83 | $this->properties = $GLOBALS['properties']->getDistListProperties(); |
| 84 | + } |
|
| 84 | 85 | |
| 85 | 86 | $data['item'] = $GLOBALS['operations']->getEmbeddedMessageProps($store, $message, $this->properties, $parentMessage, $attachNum); |
| 86 | 87 | } |
@@ -88,9 +89,10 @@ discard block |
||
| 88 | 89 | // Check if message is distlist then we need to use different set of properties |
| 89 | 90 | $props = mapi_getprops($message, [PR_MESSAGE_CLASS]); |
| 90 | 91 | |
| 91 | - if (class_match_prefix($props[PR_MESSAGE_CLASS], "IPM.Distlist")) |
|
| 92 | - // for distlist we need to use different set of properties |
|
| 92 | + if (class_match_prefix($props[PR_MESSAGE_CLASS], "IPM.Distlist")) { |
|
| 93 | + // for distlist we need to use different set of properties |
|
| 93 | 94 | $this->properties = $GLOBALS['properties']->getDistListProperties(); |
| 95 | + } |
|
| 94 | 96 | |
| 95 | 97 | // get message props of the message |
| 96 | 98 | $data['item'] = $GLOBALS['operations']->getMessageProps($store, $message, $this->properties, $this->plaintext, true); |
@@ -1877,8 +1877,9 @@ |
||
| 1877 | 1877 | // Needed for S/MIME messages with embedded message attachments |
| 1878 | 1878 | if ($parse_smime) { |
| 1879 | 1879 | $p = mapi_getprops($message, [PR_MESSAGE_CLASS]); |
| 1880 | - if ($p && stripos($p[PR_MESSAGE_CLASS], "SMIME") !== false) |
|
| 1881 | - parse_smime($store, $message); |
|
| 1880 | + if ($p && stripos($p[PR_MESSAGE_CLASS], "SMIME") !== false) { |
|
| 1881 | + parse_smime($store, $message); |
|
| 1882 | + } |
|
| 1882 | 1883 | } |
| 1883 | 1884 | |
| 1884 | 1885 | if ($message && $attach_num) { |