@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | switch ($recurrence->recur["type"]) { |
| 463 | 463 | case 10: |
| 464 | 464 | if ($recurrence->recur["subtype"] == 0) { |
| 465 | - $syncRecurrence->interval = (int) ($recurrence->recur["everyn"] / 1440); |
|
| 465 | + $syncRecurrence->interval = (int)($recurrence->recur["everyn"] / 1440); |
|
| 466 | 466 | } // minutes |
| 467 | 467 | break; |
| 468 | 468 | |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | break; // months / weeks |
| 473 | 473 | |
| 474 | 474 | case 13: |
| 475 | - $syncRecurrence->interval = (int) ($recurrence->recur["everyn"] / 12); |
|
| 475 | + $syncRecurrence->interval = (int)($recurrence->recur["everyn"] / 12); |
|
| 476 | 476 | break; // months |
| 477 | 477 | } |
| 478 | 478 | |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | $syncRecurrence->weekofmonth = $recurrence->recur["nday"]; |
| 484 | 484 | } // N'th {DAY} of {X} (0-5) |
| 485 | 485 | if (isset($recurrence->recur["month"])) { |
| 486 | - $syncRecurrence->monthofyear = (int) ($recurrence->recur["month"] / (60 * 24 * 29)) + 1; |
|
| 486 | + $syncRecurrence->monthofyear = (int)($recurrence->recur["month"] / (60 * 24 * 29)) + 1; |
|
| 487 | 487 | } // works ok due to rounding. see also $monthminutes below (1-12) |
| 488 | 488 | if (isset($recurrence->recur["monthday"])) { |
| 489 | 489 | $syncRecurrence->dayofmonth = $recurrence->recur["monthday"]; |
@@ -637,10 +637,10 @@ discard block |
||
| 637 | 637 | } |
| 638 | 638 | |
| 639 | 639 | if ($fromname) { |
| 640 | - $from = "\"" . w2u($fromname) . "\" <" . w2u($fromaddr) . ">"; |
|
| 640 | + $from = "\"".w2u($fromname)."\" <".w2u($fromaddr).">"; |
|
| 641 | 641 | } |
| 642 | 642 | else { // START CHANGED dw2412 HTC shows "error" if sender name is unknown |
| 643 | - $from = "\"" . w2u($fromaddr) . "\" <" . w2u($fromaddr) . ">"; |
|
| 643 | + $from = "\"".w2u($fromaddr)."\" <".w2u($fromaddr).">"; |
|
| 644 | 644 | } |
| 645 | 645 | // END CHANGED dw2412 HTC shows "error" if sender name is unknown |
| 646 | 646 | |
@@ -841,7 +841,7 @@ discard block |
||
| 841 | 841 | $mime = explode("/", $mimetype); |
| 842 | 842 | |
| 843 | 843 | if (count($mime) == 2 && $mime[0] == "image") { |
| 844 | - $attach->displayname = "inline." . $mime[1]; |
|
| 844 | + $attach->displayname = "inline.".$mime[1]; |
|
| 845 | 845 | } |
| 846 | 846 | } |
| 847 | 847 | |
@@ -943,10 +943,10 @@ discard block |
||
| 943 | 943 | } |
| 944 | 944 | else { |
| 945 | 945 | if (substr($name, 0, 1) != '"' && substr($name, -1) != '"') { |
| 946 | - $fulladdr = "\"" . w2u($name) . "\" <" . w2u($address) . ">"; |
|
| 946 | + $fulladdr = "\"".w2u($name)."\" <".w2u($address).">"; |
|
| 947 | 947 | } |
| 948 | 948 | else { |
| 949 | - $fulladdr = w2u($name) . "<" . w2u($address) . ">"; |
|
| 949 | + $fulladdr = w2u($name)."<".w2u($address).">"; |
|
| 950 | 950 | } |
| 951 | 951 | } |
| 952 | 952 | |
@@ -1540,8 +1540,7 @@ discard block |
||
| 1540 | 1540 | if (isset($exception->asbody)) { |
| 1541 | 1541 | $this->setASbody($exception->asbody, $exceptionprops, $appointmentprops); |
| 1542 | 1542 | $mapiexception["body"] = $exceptionprops[$appointmentprops["body"]] = |
| 1543 | - (isset($exceptionprops[$appointmentprops["body"]])) ? $exceptionprops[$appointmentprops["body"]] : |
|
| 1544 | - ((isset($exceptionprops[$appointmentprops["html"]])) ? $exceptionprops[$appointmentprops["html"]] : ""); |
|
| 1543 | + (isset($exceptionprops[$appointmentprops["body"]])) ? $exceptionprops[$appointmentprops["body"]] : ((isset($exceptionprops[$appointmentprops["html"]])) ? $exceptionprops[$appointmentprops["html"]] : ""); |
|
| 1545 | 1544 | } |
| 1546 | 1545 | |
| 1547 | 1546 | array_push($recur["changed_occurrences"], $mapiexception); |
@@ -1582,7 +1581,7 @@ discard block |
||
| 1582 | 1581 | $props[$appointmentprops["representingname"]] = ($displayname !== false) ? $displayname : Request::GetUser(); |
| 1583 | 1582 | $props[$appointmentprops["sentrepresentingemail"]] = Request::GetUser(); |
| 1584 | 1583 | $props[$appointmentprops["sentrepresentingaddt"]] = "ZARAFA"; |
| 1585 | - $props[$appointmentprops["sentrepresentinsrchk"]] = $props[$appointmentprops["sentrepresentingaddt"]] . ":" . $props[$appointmentprops["sentrepresentingemail"]]; |
|
| 1584 | + $props[$appointmentprops["sentrepresentinsrchk"]] = $props[$appointmentprops["sentrepresentingaddt"]].":".$props[$appointmentprops["sentrepresentingemail"]]; |
|
| 1586 | 1585 | |
| 1587 | 1586 | if (isset($appointment->attendees) && is_array($appointment->attendees) && !empty($appointment->attendees)) { |
| 1588 | 1587 | $props[$appointmentprops["icon"]] = 1026; |
@@ -1616,7 +1615,7 @@ discard block |
||
| 1616 | 1615 | $org[PR_ADDRTYPE] = isset($representingprops[$appointmentprops["sentrepresentingaddt"]]) ? $representingprops[$appointmentprops["sentrepresentingaddt"]] : $props[$appointmentprops["sentrepresentingaddt"]]; |
| 1617 | 1616 | $org[PR_SMTP_ADDRESS] = $org[PR_EMAIL_ADDRESS] = isset($representingprops[$appointmentprops["sentrepresentingemail"]]) ? $representingprops[$appointmentprops["sentrepresentingemail"]] : $props[$appointmentprops["sentrepresentingemail"]]; |
| 1618 | 1617 | $org[PR_SEARCH_KEY] = isset($representingprops[$appointmentprops["sentrepresentinsrchk"]]) ? $representingprops[$appointmentprops["sentrepresentinsrchk"]] : $props[$appointmentprops["sentrepresentinsrchk"]]; |
| 1619 | - $org[PR_RECIPIENT_FLAGS] = recipOrganizer | recipSendable; |
|
| 1618 | + $org[PR_RECIPIENT_FLAGS] = recipOrganizer|recipSendable; |
|
| 1620 | 1619 | $org[PR_RECIPIENT_TYPE] = MAPI_ORIG; |
| 1621 | 1620 | |
| 1622 | 1621 | array_push($recips, $org); |
@@ -1643,7 +1642,7 @@ discard block |
||
| 1643 | 1642 | } |
| 1644 | 1643 | else { |
| 1645 | 1644 | $recip[PR_DISPLAY_NAME] = u2w($attendee->name); |
| 1646 | - $recip[PR_SEARCH_KEY] = "SMTP:" . $recip[PR_EMAIL_ADDRESS] . "\0"; |
|
| 1645 | + $recip[PR_SEARCH_KEY] = "SMTP:".$recip[PR_EMAIL_ADDRESS]."\0"; |
|
| 1647 | 1646 | $recip[PR_ADDRTYPE] = "SMTP"; |
| 1648 | 1647 | $recip[PR_RECIPIENT_TYPE] = isset($attendee->attendeetype) ? $attendee->attendeetype : MAPI_TO; |
| 1649 | 1648 | $recip[PR_ENTRYID] = mapi_createoneoff($recip[PR_DISPLAY_NAME], $recip[PR_ADDRTYPE], $recip[PR_EMAIL_ADDRESS]); |
@@ -2194,8 +2193,8 @@ discard block |
||
| 2194 | 2193 | * @return array |
| 2195 | 2194 | */ |
| 2196 | 2195 | private function getTZFromMAPIBlob($data) { |
| 2197 | - return unpack("lbias/lstdbias/ldstbias/" . |
|
| 2198 | - "vconst1/vdstendyear/vdstendmonth/vdstendday/vdstendweek/vdstendhour/vdstendminute/vdstendsecond/vdstendmillis/" . |
|
| 2196 | + return unpack("lbias/lstdbias/ldstbias/". |
|
| 2197 | + "vconst1/vdstendyear/vdstendmonth/vdstendday/vdstendweek/vdstendhour/vdstendminute/vdstendsecond/vdstendmillis/". |
|
| 2199 | 2198 | "vconst2/vdststartyear/vdststartmonth/vdststartday/vdststartweek/vdststarthour/vdststartminute/vdststartsecond/vdststartmillis", $data); |
| 2200 | 2199 | } |
| 2201 | 2200 | |
@@ -2207,8 +2206,8 @@ discard block |
||
| 2207 | 2206 | * @return array |
| 2208 | 2207 | */ |
| 2209 | 2208 | private function getTZFromSyncBlob($data) { |
| 2210 | - $tz = unpack("lbias/a64tzname/vdstendyear/vdstendmonth/vdstendday/vdstendweek/vdstendhour/vdstendminute/vdstendsecond/vdstendmillis/" . |
|
| 2211 | - "lstdbias/a64tznamedst/vdststartyear/vdststartmonth/vdststartday/vdststartweek/vdststarthour/vdststartminute/vdststartsecond/vdststartmillis/" . |
|
| 2209 | + $tz = unpack("lbias/a64tzname/vdstendyear/vdstendmonth/vdstendday/vdstendweek/vdstendhour/vdstendminute/vdstendsecond/vdstendmillis/". |
|
| 2210 | + "lstdbias/a64tznamedst/vdststartyear/vdststartmonth/vdststartday/vdststartweek/vdststarthour/vdststartminute/vdststartsecond/vdststartmillis/". |
|
| 2212 | 2211 | "ldstbias", $data); |
| 2213 | 2212 | |
| 2214 | 2213 | // Make the structure compatible with class.recurrence.php |
@@ -2227,7 +2226,7 @@ discard block |
||
| 2227 | 2226 | */ |
| 2228 | 2227 | private function getMAPIBlobFromTZ($tz) { |
| 2229 | 2228 | return pack( |
| 2230 | - "lll" . "vvvvvvvvv" . "vvvvvvvvv", |
|
| 2229 | + "lll"."vvvvvvvvv"."vvvvvvvvv", |
|
| 2231 | 2230 | $tz["bias"], |
| 2232 | 2231 | $tz["stdbias"], |
| 2233 | 2232 | $tz["dstbias"], |
@@ -2462,11 +2461,11 @@ discard block |
||
| 2462 | 2461 | */ |
| 2463 | 2462 | private function composeDisplayName(&$contact) { |
| 2464 | 2463 | // Set display name and subject to a combined value of firstname and lastname |
| 2465 | - $cname = (isset($contact->prefix)) ? u2w($contact->prefix) . " " : ""; |
|
| 2464 | + $cname = (isset($contact->prefix)) ? u2w($contact->prefix)." " : ""; |
|
| 2466 | 2465 | $cname .= u2w($contact->firstname); |
| 2467 | - $cname .= (isset($contact->middlename)) ? " " . u2w($contact->middlename) : ""; |
|
| 2468 | - $cname .= " " . u2w($contact->lastname); |
|
| 2469 | - $cname .= (isset($contact->suffix)) ? " " . u2w($contact->suffix) : ""; |
|
| 2466 | + $cname .= (isset($contact->middlename)) ? " ".u2w($contact->middlename) : ""; |
|
| 2467 | + $cname .= " ".u2w($contact->lastname); |
|
| 2468 | + $cname .= (isset($contact->suffix)) ? " ".u2w($contact->suffix) : ""; |
|
| 2470 | 2469 | |
| 2471 | 2470 | return trim($cname); |
| 2472 | 2471 | } |
@@ -2494,7 +2493,7 @@ discard block |
||
| 2494 | 2493 | $props[$properties["emailaddresstype{$cnt}"]] = "SMTP"; |
| 2495 | 2494 | $props[$properties["emailaddressentryid{$cnt}"]] = mapi_createoneoff($name, "SMTP", $emailAddress); |
| 2496 | 2495 | $nremails[] = $cnt - 1; |
| 2497 | - $abprovidertype |= 2 ^ ($cnt - 1); |
|
| 2496 | + $abprovidertype |= 2^($cnt - 1); |
|
| 2498 | 2497 | } |
| 2499 | 2498 | } |
| 2500 | 2499 | |
@@ -2514,29 +2513,29 @@ discard block |
||
| 2514 | 2513 | */ |
| 2515 | 2514 | private function setAddress($type, &$city, &$country, &$postalcode, &$state, &$street, &$props, &$properties) { |
| 2516 | 2515 | if (isset($city)) { |
| 2517 | - $props[$properties[$type . "city"]] = $city = u2w($city); |
|
| 2516 | + $props[$properties[$type."city"]] = $city = u2w($city); |
|
| 2518 | 2517 | } |
| 2519 | 2518 | |
| 2520 | 2519 | if (isset($country)) { |
| 2521 | - $props[$properties[$type . "country"]] = $country = u2w($country); |
|
| 2520 | + $props[$properties[$type."country"]] = $country = u2w($country); |
|
| 2522 | 2521 | } |
| 2523 | 2522 | |
| 2524 | 2523 | if (isset($postalcode)) { |
| 2525 | - $props[$properties[$type . "postalcode"]] = $postalcode = u2w($postalcode); |
|
| 2524 | + $props[$properties[$type."postalcode"]] = $postalcode = u2w($postalcode); |
|
| 2526 | 2525 | } |
| 2527 | 2526 | |
| 2528 | 2527 | if (isset($state)) { |
| 2529 | - $props[$properties[$type . "state"]] = $state = u2w($state); |
|
| 2528 | + $props[$properties[$type."state"]] = $state = u2w($state); |
|
| 2530 | 2529 | } |
| 2531 | 2530 | |
| 2532 | 2531 | if (isset($street)) { |
| 2533 | - $props[$properties[$type . "street"]] = $street = u2w($street); |
|
| 2532 | + $props[$properties[$type."street"]] = $street = u2w($street); |
|
| 2534 | 2533 | } |
| 2535 | 2534 | |
| 2536 | 2535 | // set composed address |
| 2537 | 2536 | $address = Utils::BuildAddressString($street, $postalcode, $city, $state, $country); |
| 2538 | 2537 | if ($address) { |
| 2539 | - $props[$properties[$type . "address"]] = $address; |
|
| 2538 | + $props[$properties[$type."address"]] = $address; |
|
| 2540 | 2539 | } |
| 2541 | 2540 | } |
| 2542 | 2541 | |
@@ -2705,7 +2704,7 @@ discard block |
||
| 2705 | 2704 | return false; |
| 2706 | 2705 | } |
| 2707 | 2706 | |
| 2708 | - return $parsedAddress[0]->mailbox . '@' . $parsedAddress[0]->host; |
|
| 2707 | + return $parsedAddress[0]->mailbox.'@'.$parsedAddress[0]->host; |
|
| 2709 | 2708 | } |
| 2710 | 2709 | |
| 2711 | 2710 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $folderidForBackendId = GSync::GetDeviceManager()->GetFolderIdForBackendId($this->folderidHex); |
| 59 | 59 | // Only append backend id if the mapping backendid<->folderid is available. |
| 60 | 60 | if ($folderidForBackendId != $this->folderidHex) { |
| 61 | - $this->prefix = $folderidForBackendId . ':'; |
|
| 61 | + $this->prefix = $folderidForBackendId.':'; |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | else { |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | |
| 411 | 411 | $sourcekeyprops = mapi_getprops($mapimessage, [PR_SOURCE_KEY]); |
| 412 | 412 | |
| 413 | - return $this->prefix . bin2hex($sourcekeyprops[PR_SOURCE_KEY]); |
|
| 413 | + return $this->prefix.bin2hex($sourcekeyprops[PR_SOURCE_KEY]); |
|
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | throw new StatusException(sprintf("ImportChangesICS->ImportMessageChange('%s','%s'): Error updating object: 0x%X", $id, get_class($message), mapi_last_hresult()), SYNC_STATUS_OBJECTNOTFOUND); |
@@ -618,10 +618,10 @@ discard block |
||
| 618 | 618 | // prepend the destination short folderid, if it exists |
| 619 | 619 | $destShortId = GSync::GetDeviceManager()->GetFolderIdForBackendId($newfolder); |
| 620 | 620 | if ($destShortId !== $newfolder) { |
| 621 | - $prefix = $destShortId . ":"; |
|
| 621 | + $prefix = $destShortId.":"; |
|
| 622 | 622 | } |
| 623 | 623 | |
| 624 | - return $prefix . bin2hex($sourcekeyprops[PR_SOURCE_KEY]); |
|
| 624 | + return $prefix.bin2hex($sourcekeyprops[PR_SOURCE_KEY]); |
|
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | return false; |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | "ended" => 0, |
| 46 | 46 | "push" => false, |
| 47 | 47 | ]; |
| 48 | - $this->disabled = (bool) (defined('TOPCOLLECTOR_DISABLED') && constant('TOPCOLLECTOR_DISABLED') === true); |
|
| 48 | + $this->disabled = (bool)(defined('TOPCOLLECTOR_DISABLED') && constant('TOPCOLLECTOR_DISABLED') === true); |
|
| 49 | 49 | $this->checkEnabledTime = time() - self::ENABLED_CACHETIME - 1; |
| 50 | 50 | $this->AnnounceInformation("initializing"); |
| 51 | 51 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | if ($terminating) { |
| 104 | 104 | $this->latest["ended"] = time(); |
| 105 | 105 | foreach ($this->preserved as $p) { |
| 106 | - $this->latest["addinfo"] .= " : " . $p; |
|
| 106 | + $this->latest["addinfo"] .= " : ".$p; |
|
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | |
@@ -289,11 +289,11 @@ |
||
| 289 | 289 | protected function getComposedKey($key1, $key2, $key3 = -1) { |
| 290 | 290 | $_k = $key1; |
| 291 | 291 | if ($key2 > -1) { |
| 292 | - $_k .= "|-|" . $key2; |
|
| 292 | + $_k .= "|-|".$key2; |
|
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | if ($key3 > -1) { |
| 296 | - $_k .= "|-|" . $key3; |
|
| 296 | + $_k .= "|-|".$key3; |
|
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | return $_k; |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | $this->SetHierarchyCache(); |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | - SLog::Write(LOGLEVEL_DEBUG, "ASDevice->GetHierarchyCache(): " . $this->hierarchyCache->GetStat()); |
|
| 354 | + SLog::Write(LOGLEVEL_DEBUG, "ASDevice->GetHierarchyCache(): ".$this->hierarchyCache->GetStat()); |
|
| 355 | 355 | |
| 356 | 356 | return $this->hierarchyCache; |
| 357 | 357 | } |
@@ -979,7 +979,7 @@ discard block |
||
| 979 | 979 | foreach ($toOrder as $f) { |
| 980 | 980 | $s .= sprintf("'%s'('%s') ", $f['name'], $f['folderid']); |
| 981 | 981 | } |
| 982 | - SLog::Write(LOGLEVEL_ERROR, "ASDevice->SetAdditionalFolderList(): cannot proceed as these folders have invalid parentids (not found): " . $s); |
|
| 982 | + SLog::Write(LOGLEVEL_ERROR, "ASDevice->SetAdditionalFolderList(): cannot proceed as these folders have invalid parentids (not found): ".$s); |
|
| 983 | 983 | |
| 984 | 984 | return false; |
| 985 | 985 | } |
@@ -1042,12 +1042,12 @@ discard block |
||
| 1042 | 1042 | private function generateFolderHash($backendid, $folderOrigin, $folderName) { |
| 1043 | 1043 | // Hash backendid with crc32 and get the hex representation of it. |
| 1044 | 1044 | // 5 chars of hash + $folderOrigin should still be enough to avoid collisions. |
| 1045 | - $folderId = substr($folderOrigin . dechex(crc32($backendid)), 0, 6); |
|
| 1045 | + $folderId = substr($folderOrigin.dechex(crc32($backendid)), 0, 6); |
|
| 1046 | 1046 | $cnt = 0; |
| 1047 | 1047 | // Collision avoiding. Append an increasing number to the string to hash |
| 1048 | 1048 | // until there aren't any collisions. Probably a smaller number is also sufficient. |
| 1049 | 1049 | while ((isset($this->contentData[$folderId]) || (is_array($this->backend2folderidCache) && in_array($folderId, $this->backend2folderidCache, true))) && $cnt < 10000) { |
| 1050 | - $folderId = substr($folderOrigin . dechex(crc32($backendid . $folderName . $cnt++)), 0, 6); |
|
| 1050 | + $folderId = substr($folderOrigin.dechex(crc32($backendid.$folderName.$cnt++)), 0, 6); |
|
| 1051 | 1051 | SLog::Write(LOGLEVEL_WARN, sprintf("ASDevice->generateFolderHash(): collision avoiding nr %05d. Generated hash: '%s'", $cnt, $folderId)); |
| 1052 | 1052 | } |
| 1053 | 1053 | if ($cnt >= 10000) { |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | } |
| 425 | 425 | |
| 426 | 426 | $ok = false; |
| 427 | - $brokenkey = self::BROKENMSGS . "-" . $folderid; |
|
| 427 | + $brokenkey = self::BROKENMSGS."-".$folderid; |
|
| 428 | 428 | |
| 429 | 429 | // initialize params |
| 430 | 430 | $this->initializeParams(); |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | return []; |
| 466 | 466 | } |
| 467 | 467 | |
| 468 | - $brokenkey = self::BROKENMSGS . "-" . $folderid; |
|
| 468 | + $brokenkey = self::BROKENMSGS."-".$folderid; |
|
| 469 | 469 | $removeIds = []; |
| 470 | 470 | $okIds = []; |
| 471 | 471 | |
@@ -606,7 +606,7 @@ discard block |
||
| 606 | 606 | (isset($current["usage"]) && $current["usage"] >= $counter) |
| 607 | 607 | )) { |
| 608 | 608 | $usage = isset($current["usage"]) ? sprintf(" - counter %d already expired", $current["usage"]) : ""; |
| 609 | - SLog::Write(LOGLEVEL_DEBUG, "LoopDetection->IsSyncStateObsolete(): yes, counter already processed" . $usage); |
|
| 609 | + SLog::Write(LOGLEVEL_DEBUG, "LoopDetection->IsSyncStateObsolete(): yes, counter already processed".$usage); |
|
| 610 | 610 | $obsolete = true; |
| 611 | 611 | } |
| 612 | 612 | } |
@@ -758,7 +758,7 @@ discard block |
||
| 758 | 758 | $current['loopcount'] = 1; |
| 759 | 759 | // the MaxCount is the max number of messages exported before |
| 760 | 760 | $current['maxCount'] = $counter + (($maxItems < $queuedMessages) ? $maxItems : $queuedMessages); |
| 761 | - $loop = true; // loop mode!! |
|
| 761 | + $loop = true; // loop mode!! |
|
| 762 | 762 | } |
| 763 | 763 | } |
| 764 | 764 | elseif ($queuedMessages == 0) { |
@@ -778,7 +778,7 @@ discard block |
||
| 778 | 778 | $this->ignore_messageid = $current['potential']; |
| 779 | 779 | } |
| 780 | 780 | $current['maxCount'] = $counter + (($maxItems < $queuedMessages) ? $maxItems : $queuedMessages); |
| 781 | - $loop = true; // loop mode!! |
|
| 781 | + $loop = true; // loop mode!! |
|
| 782 | 782 | } |
| 783 | 783 | } |
| 784 | 784 | } |
@@ -853,7 +853,7 @@ discard block |
||
| 853 | 853 | $changedData = true; |
| 854 | 854 | |
| 855 | 855 | // check if this message was broken before - here we know that it still is and remove it from the tracking |
| 856 | - $brokenkey = self::BROKENMSGS . "-" . $folderid; |
|
| 856 | + $brokenkey = self::BROKENMSGS."-".$folderid; |
|
| 857 | 857 | // TODO: this is currently not supported here! It's in a different structure now! |
| 858 | 858 | // if (isset($loopdata[self::$devid][self::$user][$brokenkey]) && isset($loopdata[self::$devid][self::$user][$brokenkey][$messageid])) { |
| 859 | 859 | // SLog::Write(LOGLEVEL_DEBUG, sprintf("LoopDetection->IgnoreNextMessage(): previously broken message '%s' is still broken and will not be tracked anymore", $messageid)); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | public const UNAUTHENTICATED = 1; |
| 12 | 12 | public const UNPROVISIONED = 2; |
| 13 | 13 | public const NOACTIVESYNCCOMMAND = 3; |
| 14 | - public const WEBSERVICECOMMAND = 4; // DEPRECATED |
|
| 14 | + public const WEBSERVICECOMMAND = 4; // DEPRECATED |
|
| 15 | 15 | public const HIERARCHYCOMMAND = 5; |
| 16 | 16 | public const PLAININPUT = 6; |
| 17 | 17 | public const REQUESTHANDLER = 7; |
@@ -473,8 +473,8 @@ discard block |
||
| 473 | 473 | |
| 474 | 474 | $rbn = substr($backendname, 7); |
| 475 | 475 | |
| 476 | - $subdirbackend = REAL_BASE_PATH . "backend/" . $rbn . "/" . $rbn . ".php"; |
|
| 477 | - $stdbackend = REAL_BASE_PATH . "backend/" . $rbn . ".php"; |
|
| 476 | + $subdirbackend = REAL_BASE_PATH."backend/".$rbn."/".$rbn.".php"; |
|
| 477 | + $stdbackend = REAL_BASE_PATH."backend/".$rbn.".php"; |
|
| 478 | 478 | |
| 479 | 479 | if (is_file($subdirbackend)) { |
| 480 | 480 | $toLoad = $subdirbackend; |
@@ -676,7 +676,7 @@ discard block |
||
| 676 | 676 | SLog::Write(LOGLEVEL_DEBUG, "GSync::PrintGrommunioSyncLegal()"); |
| 677 | 677 | |
| 678 | 678 | if ($message) { |
| 679 | - $message = "<h3>" . $message . "</h3>"; |
|
| 679 | + $message = "<h3>".$message."</h3>"; |
|
| 680 | 680 | } |
| 681 | 681 | if ($additionalMessage) { |
| 682 | 682 | $additionalMessage .= "<br>"; |
@@ -736,7 +736,7 @@ discard block |
||
| 736 | 736 | return "MS-Server-ActiveSync: 6.5.7638.1"; |
| 737 | 737 | } |
| 738 | 738 | |
| 739 | - return "MS-Server-ActiveSync: " . self::GetSupportedASVersion(); |
|
| 739 | + return "MS-Server-ActiveSync: ".self::GetSupportedASVersion(); |
|
| 740 | 740 | } |
| 741 | 741 | |
| 742 | 742 | /** |
@@ -748,13 +748,13 @@ discard block |
||
| 748 | 748 | */ |
| 749 | 749 | public static function GetSupportedProtocolVersions($valueOnly = false) { |
| 750 | 750 | $versions = implode(',', array_slice(self::$supportedASVersions, 0, (array_search(self::GetSupportedASVersion(), self::$supportedASVersions) + 1))); |
| 751 | - SLog::Write(LOGLEVEL_DEBUG, "GSync::GetSupportedProtocolVersions(): " . $versions); |
|
| 751 | + SLog::Write(LOGLEVEL_DEBUG, "GSync::GetSupportedProtocolVersions(): ".$versions); |
|
| 752 | 752 | |
| 753 | 753 | if ($valueOnly === true) { |
| 754 | 754 | return $versions; |
| 755 | 755 | } |
| 756 | 756 | |
| 757 | - return "MS-ASProtocolVersions: " . $versions; |
|
| 757 | + return "MS-ASProtocolVersions: ".$versions; |
|
| 758 | 758 | } |
| 759 | 759 | |
| 760 | 760 | /** |
@@ -773,9 +773,9 @@ discard block |
||
| 773 | 773 | } |
| 774 | 774 | |
| 775 | 775 | $commands = implode(',', $asCommands); |
| 776 | - SLog::Write(LOGLEVEL_DEBUG, "GSync::GetSupportedCommands(): " . $commands); |
|
| 776 | + SLog::Write(LOGLEVEL_DEBUG, "GSync::GetSupportedCommands(): ".$commands); |
|
| 777 | 777 | |
| 778 | - return "MS-ASProtocolCommands: " . $commands; |
|
| 778 | + return "MS-ASProtocolCommands: ".$commands; |
|
| 779 | 779 | } |
| 780 | 780 | |
| 781 | 781 | /** |
@@ -792,7 +792,7 @@ discard block |
||
| 792 | 792 | } |
| 793 | 793 | |
| 794 | 794 | $class = self::$supportedCommands[$commandCode][self::REQUESTHANDLER]; |
| 795 | - $handlerclass = REAL_BASE_PATH . "lib/request/" . strtolower($class) . ".php"; |
|
| 795 | + $handlerclass = REAL_BASE_PATH."lib/request/".strtolower($class).".php"; |
|
| 796 | 796 | |
| 797 | 797 | if (is_file($handlerclass)) { |
| 798 | 798 | include $handlerclass; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | $asb = new BodyPreference(); |
| 77 | - $arr = (array) $this->bodypref; |
|
| 77 | + $arr = (array)$this->bodypref; |
|
| 78 | 78 | $arr[$type] = $asb; |
| 79 | 79 | $this->bodypref = $arr; |
| 80 | 80 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | $asb = new BodyPartPreference(); |
| 101 | - $arr = (array) $this->bodypartpref; |
|
| 101 | + $arr = (array)$this->bodypartpref; |
|
| 102 | 102 | $arr[$type] = $asb; |
| 103 | 103 | $this->bodypartpref = $arr; |
| 104 | 104 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | } |
| 169 | 169 | catch (StateNotFoundException $snfex) { |
| 170 | - SLog::Write(LOGLEVEL_ERROR, "DeviceManager->Save(): Exception: " . $snfex->getMessage()); |
|
| 170 | + SLog::Write(LOGLEVEL_ERROR, "DeviceManager->Save(): Exception: ".$snfex->getMessage()); |
|
| 171 | 171 | } |
| 172 | 172 | } |
| 173 | 173 | |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | * @param bool $doSave |
| 192 | 192 | */ |
| 193 | 193 | public function DoAutomaticASDeviceSaving($doSave) { |
| 194 | - SLog::Write(LOGLEVEL_DEBUG, "DeviceManager->DoAutomaticASDeviceSaving(): save automatically: " . Utils::PrintAsString($doSave)); |
|
| 194 | + SLog::Write(LOGLEVEL_DEBUG, "DeviceManager->DoAutomaticASDeviceSaving(): save automatically: ".Utils::PrintAsString($doSave)); |
|
| 195 | 195 | $this->saveDevice = $doSave; |
| 196 | 196 | } |
| 197 | 197 | |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | // save other information |
| 215 | 215 | foreach (["model", "imei", "friendlyname", "os", "oslanguage", "phonenumber", "mobileoperator", "enableoutboundsms"] as $info) { |
| 216 | 216 | if (isset($deviceinformation->{$info}) && $deviceinformation->{$info} != "") { |
| 217 | - $this->device->__set("device" . $info, $deviceinformation->{$info}); |
|
| 217 | + $this->device->__set("device".$info, $deviceinformation->{$info}); |
|
| 218 | 218 | } |
| 219 | 219 | } |
| 220 | 220 | |
@@ -554,14 +554,14 @@ discard block |
||
| 554 | 554 | } |
| 555 | 555 | |
| 556 | 556 | // 2. step: check if there is a limitation for the hashed ID (for shared/configured stores) |
| 557 | - $spKey = $store . '/' . $folderid; |
|
| 557 | + $spKey = $store.'/'.$folderid; |
|
| 558 | 558 | if (array_key_exists($spKey, $specialSyncFilter)) { |
| 559 | 559 | $spFilter = $specialSyncFilter[$spKey]; |
| 560 | 560 | SLog::Write(LOGLEVEL_DEBUG, sprintf("Limit sync due to configured limitation on the folder: '%s': %s", $spKey, $spFilter)); |
| 561 | 561 | } |
| 562 | 562 | |
| 563 | 563 | // 3. step: check if there is a limitation for the backendId |
| 564 | - $spKey = $store . '/' . $backendFolderId; |
|
| 564 | + $spKey = $store.'/'.$backendFolderId; |
|
| 565 | 565 | if (array_key_exists($spKey, $specialSyncFilter)) { |
| 566 | 566 | $spFilter = $specialSyncFilter[$spKey]; |
| 567 | 567 | SLog::Write(LOGLEVEL_DEBUG, sprintf("Limit sync due to configured limitation on the folder: '%s': %s", $spKey, $spFilter)); |