@@ -95,7 +95,7 @@ |
||
95 | 95 | 'notifier' => [ |
96 | 96 | 'info' => [ |
97 | 97 | 'files' => [ |
98 | - 'value' => "dropdown", // static notifier |
|
98 | + 'value' => "dropdown", // static notifier |
|
99 | 99 | ], |
100 | 100 | ], |
101 | 101 | ], |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | * Search the backend folder for backends and register them. |
61 | 61 | */ |
62 | 62 | public function initialize() { |
63 | - $list = []; // this hold our plugin folders |
|
63 | + $list = []; // this hold our plugin folders |
|
64 | 64 | $workdir = __DIR__ . self::BACKEND_DIR; |
65 | 65 | |
66 | 66 | // Populate the list of directories to check against |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * Search the backend folder for external backends and register them. |
88 | 88 | */ |
89 | 89 | public function initializeExternal() { |
90 | - $list = []; // this hold our plugin folders |
|
90 | + $list = []; // this hold our plugin folders |
|
91 | 91 | $workdir = $this->EXTERNAL_BACKEND_DIR; |
92 | 92 | |
93 | 93 | // Populate the list of directories to check against |
@@ -191,7 +191,7 @@ |
||
191 | 191 | "fields" => $this->formFields, |
192 | 192 | "formConfig" => $this->formConfig, |
193 | 193 | ], |
194 | - "data" => [ // here we can specify the default values. |
|
194 | + "data" => [// here we can specify the default values. |
|
195 | 195 | "server_address" => "files.demo.com", |
196 | 196 | "server_port" => "80", |
197 | 197 | "server_path" => "/remote.php/webdav", |
@@ -136,7 +136,7 @@ |
||
136 | 136 | "fields" => $this->formFields, |
137 | 137 | "formConfig" => $this->formConfig, |
138 | 138 | ], |
139 | - "data" => [ // here we can specify the default values. |
|
139 | + "data" => [// here we can specify the default values. |
|
140 | 140 | "server_address" => $_SERVER['HTTP_HOST'], |
141 | 141 | "server_ssl" => true, |
142 | 142 | "server_port" => "443", |
@@ -445,7 +445,7 @@ |
||
445 | 445 | |
446 | 446 | public static function my_rsa_sha_encode($data, $key_id, $signagure_alg) { |
447 | 447 | $algos = [ |
448 | - 'sha1WithRSAEncryption' => ['alg' => 'sha1', 'oid' => '1.3.14.3.2.26'], |
|
448 | + 'sha1WithRSAEncryption' => ['alg' => 'sha1', 'oid' => '1.3.14.3.2.26'], |
|
449 | 449 | 'sha256WithRSAEncryption' => ['alg' => 'sha256', 'oid' => '2.16.840.1.101.3.4.2.1'], |
450 | 450 | 'sha384WithRSAEncryption' => ['alg' => 'sha384', 'oid' => '2.16.840.1.101.3.4.2.2'], |
451 | 451 | 'sha512WithRSAEncryption' => ['alg' => 'sha512', 'oid' => '2.16.840.1.101.3.4.2.3'], |
@@ -212,7 +212,7 @@ |
||
212 | 212 | } |
213 | 213 | |
214 | 214 | protected function name($tag = null) { |
215 | - $this->beginsequence($tag); # seq of RDN |
|
215 | + $this->beginsequence($tag); # seq of RDN |
|
216 | 216 | $res = []; |
217 | 217 | while ($this->in()) { |
218 | 218 | $parts = []; |
@@ -454,7 +454,7 @@ |
||
454 | 454 | } |
455 | 455 | |
456 | 456 | if (!encryptionStoreExpirationSupport()) { |
457 | - withPHPSession(function () use ($encryptionStore) { |
|
457 | + withPHPSession(function() use ($encryptionStore) { |
|
458 | 458 | $encryptionStore->add('smime', ''); |
459 | 459 | }); |
460 | 460 | } |
@@ -165,8 +165,9 @@ discard block |
||
165 | 165 | if ($messageClass !== 'IPM.Note.SMIME' && |
166 | 166 | $messageClass !== 'IPM.Note.SMIME.SignedEncrypt' && |
167 | 167 | $messageClass !== 'IPM.Note.deferSMIME' && |
168 | - $messageClass !== 'IPM.Note.deferSMIME.SignedEncrypt') |
|
169 | - return; |
|
168 | + $messageClass !== 'IPM.Note.deferSMIME.SignedEncrypt') { |
|
169 | + return; |
|
170 | + } |
|
170 | 171 | |
171 | 172 | $recipients = $data['action']['props']['smime']; |
172 | 173 | $missingCerts = []; |
@@ -300,8 +301,9 @@ discard block |
||
300 | 301 | $importCert = file_get_contents($outcert); |
301 | 302 | $parsedImportCert = openssl_x509_parse($importCert); |
302 | 303 | $parsedUserCert = openssl_x509_parse($userCert); |
303 | - if (!$signed_ok || $openssl_error_code === OPENSSL_CA_VERIFY_FAIL) |
|
304 | - continue; |
|
304 | + if (!$signed_ok || $openssl_error_code === OPENSSL_CA_VERIFY_FAIL) { |
|
305 | + continue; |
|
306 | + } |
|
305 | 307 | |
306 | 308 | // CA Checks out |
307 | 309 | $caCerts = $this->extractCAs($tmpfname); |
@@ -528,8 +530,9 @@ discard block |
||
528 | 530 | * @param {mixed} $data |
529 | 531 | */ |
530 | 532 | public function onUploadCertificate($data) { |
531 | - if ($data['sourcetype'] !== 'certificate') |
|
532 | - return; |
|
533 | + if ($data['sourcetype'] !== 'certificate') { |
|
534 | + return; |
|
535 | + } |
|
533 | 536 | $passphrase = $_POST['passphrase']; |
534 | 537 | $saveCert = false; |
535 | 538 | $tmpname = $data['tmpname']; |
@@ -604,11 +607,13 @@ discard block |
||
604 | 607 | $props = mapi_getprops($message, [PR_MESSAGE_CLASS]); |
605 | 608 | $messageClass = $props[PR_MESSAGE_CLASS]; |
606 | 609 | |
607 | - if (!isset($messageClass)) |
|
608 | - return; |
|
610 | + if (!isset($messageClass)) { |
|
611 | + return; |
|
612 | + } |
|
609 | 613 | if (stripos($messageClass, 'IPM.Note.deferSMIME') === false && |
610 | - stripos($messageClass, 'IPM.Note.SMIME') === false) |
|
611 | - return; |
|
614 | + stripos($messageClass, 'IPM.Note.SMIME') === false) { |
|
615 | + return; |
|
616 | + } |
|
612 | 617 | |
613 | 618 | // FIXME: for now return when we are going to sign but we don't have the passphrase set |
614 | 619 | // This should never happen sign |
@@ -617,8 +622,9 @@ discard block |
||
617 | 622 | $messageClass === 'IPM.Note.deferSMIME.MultipartSigned' || |
618 | 623 | $messageClass === 'IPM.Note.SMIME.SignedEncrypt' || |
619 | 624 | $messageClass === 'IPM.Note.SMIME.MultipartSigned') && |
620 | - !$encryptionStore->get('smime')) |
|
621 | - return; |
|
625 | + !$encryptionStore->get('smime')) { |
|
626 | + return; |
|
627 | + } |
|
622 | 628 | // NOTE: setting message class to IPM.Note, so that mapi_inetmapi_imtoinet converts the message to plain email |
623 | 629 | // and doesn't fail when handling the attachments. |
624 | 630 | mapi_setprops($message, [PR_MESSAGE_CLASS => 'IPM.Note']); |
@@ -862,8 +868,9 @@ discard block |
||
862 | 868 | foreach ($certs as $cert) { |
863 | 869 | $pubkey = mapi_msgstore_openentry($this->getStore(), $cert[PR_ENTRYID]); |
864 | 870 | $certificate = ""; |
865 | - if ($pubkey == false) |
|
866 | - continue; |
|
871 | + if ($pubkey == false) { |
|
872 | + continue; |
|
873 | + } |
|
867 | 874 | // retrieve pkcs#11 certificate from body |
868 | 875 | $stream = mapi_openproperty($pubkey, PR_BODY, IID_IStream, 0, 0); |
869 | 876 | $stat = mapi_stream_stat($stream); |
@@ -985,8 +992,9 @@ discard block |
||
985 | 992 | */ |
986 | 993 | public function importCertificate($cert, $certData, $type = 'public', $force = false) { |
987 | 994 | $certEmail = getCertEmail($certData); |
988 | - if ($this->pubcertExists($certEmail) && !$force && $type !== 'private') |
|
989 | - return; |
|
995 | + if ($this->pubcertExists($certEmail) && !$force && $type !== 'private') { |
|
996 | + return; |
|
997 | + } |
|
990 | 998 | $issued_by = ""; |
991 | 999 | foreach (array_keys($certData['issuer']) as $key) { |
992 | 1000 | $issued_by .= $key . '=' . $certData['issuer'][$key] . "\n"; |
@@ -1110,8 +1118,9 @@ discard block |
||
1110 | 1118 | * @return array with properties |
1111 | 1119 | */ |
1112 | 1120 | public function getSenderAddress($mapiMessage) { |
1113 | - if (method_exists($GLOBALS['operations'], 'getSenderAddress')) |
|
1114 | - return $GLOBALS["operations"]->getSenderAddress($mapiMessage); |
|
1121 | + if (method_exists($GLOBALS['operations'], 'getSenderAddress')) { |
|
1122 | + return $GLOBALS["operations"]->getSenderAddress($mapiMessage); |
|
1123 | + } |
|
1115 | 1124 | |
1116 | 1125 | $messageProps = mapi_getprops($mapiMessage, [PR_SENT_REPRESENTING_ENTRYID, PR_SENDER_ENTRYID]); |
1117 | 1126 | $senderEntryID = isset($messageProps[PR_SENT_REPRESENTING_ENTRYID]) ? $messageProps[PR_SENT_REPRESENTING_ENTRYID] : $messageProps[PR_SENDER_ENTRYID]; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * @return bool true on success or false on failure |
109 | 109 | */ |
110 | 110 | public function save($store, $parententryid, $entryid, $action) { |
111 | - $properiesToDelete = []; // create an array of properties which should be deleted |
|
111 | + $properiesToDelete = []; // create an array of properties which should be deleted |
|
112 | 112 | // this array is passed to $GLOBALS['operations']->saveMessage() function |
113 | 113 | |
114 | 114 | if (!$store && !$parententryid) { |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | |
450 | 450 | // UTC time |
451 | 451 | $startDateUTC = $actionProps[$type]; |
452 | - $dueDateUTC = $actionProps[$type] + (24 * 60 * 60); // ONE DAY is added to set duedate of item. |
|
452 | + $dueDateUTC = $actionProps[$type] + (24 * 60 * 60); // ONE DAY is added to set duedate of item. |
|
453 | 453 | |
454 | 454 | // get local time from UTC time |
455 | 455 | $recur = new Recurrence($store, []); |
@@ -122,8 +122,8 @@ |
||
122 | 122 | if (!empty($action["query"]) && !empty($recipient_history) && !empty($recipient_history['recipients'])) { |
123 | 123 | // Setup result array with match levels |
124 | 124 | $l_aResult = [ |
125 | - 0 => [], // Matches on whole string |
|
126 | - 1 => [], // Matches on part of string |
|
125 | + 0 => [], // Matches on whole string |
|
126 | + 1 => [], // Matches on part of string |
|
127 | 127 | ]; |
128 | 128 | |
129 | 129 | // Loop through all the recipients |