Skip to content

Commit

Permalink
AS16.1 Drafts - Move filtertype disable
Browse files Browse the repository at this point in the history
Moved SYNC_FILTERTYPE_DISABLE check from Kopano backend importer & exporter to common Utils::GetcutOffDate for all backends
  • Loading branch information
matidau committed Jun 5, 2024
1 parent 326fd55 commit 9d64435
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/backend/kopano/exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ public function Config($state, $flags = 0) {
public function ConfigContentParameters($contentparameters){
$filtertype = $contentparameters->GetFilterType();

if ($filtertype == SYNC_FILTERTYPE_DISABLE) {
$filtertype = false;
}

switch($contentparameters->GetContentClass()) {
case "Email":
$this->restriction = ($filtertype || !Utils::CheckMapiExtVersion('7')) ? MAPIUtils::GetEmailRestriction(Utils::GetCutOffDate($filtertype)) : false;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ static public function ExtractBaseDate($goid, $recurStartTime) {
static public function GetCutOffDate($filtertype) {
$back = Utils::GetFiltertypeInterval($filtertype);

if ($back === false) {
if (($back === false) || ($back == SYNC_FILTERTYPE_DISABLED)) {
return 0; // unlimited
}

Expand Down

0 comments on commit 9d64435

Please sign in to comment.