diff --git a/Classes/Service/DestinationDataImportService.php b/Classes/Service/DestinationDataImportService.php index b0c81c9..7bae77a 100644 --- a/Classes/Service/DestinationDataImportService.php +++ b/Classes/Service/DestinationDataImportService.php @@ -372,13 +372,14 @@ class DestinationDataImportService { } else { - if ($date['freq'] == 'Daily' && empty($date['weekdays'])) { + if ($date['freq'] == 'Daily' && empty($date['weekdays']) && !empty($date['repeatUntil'])) { $this->logger->info('Setup daily interval dates'); $this->logger->info('Start ' . $date['start']); $this->logger->info('End ' . $date['repeatUntil']); $start = new \DateTime($date['start'], new \DateTimeZone($date['tz'])); $until = new \DateTime($date['repeatUntil'], new \DateTimeZone($date['tz'])); + for($i = strtotime($start->format('l'), $start->getTimestamp()); $i <= $until->getTimestamp(); $i = strtotime('+1 day', $i)) { if ($i >= $today) { $eventStart = new \DateTime(); @@ -396,13 +397,14 @@ class DestinationDataImportService { } - else if ($date['freq'] == 'Weekly' && !empty($date['weekdays'])) { + else if ($date['freq'] == 'Weekly' && !empty($date['weekdays']) && !empty($date['repeatUntil'])) { foreach ($date['weekdays'] as $day) { $this->logger->info('Setup weekly interval dates for ' . $day); $this->logger->info('Start ' . $date['start']); $this->logger->info('End ' . $date['repeatUntil']); $start = new \DateTime($date['start'], new \DateTimeZone($date['tz'])); $until = new \DateTime($date['repeatUntil'], new \DateTimeZone($date['tz'])); + for($i = strtotime($day, $start->getTimestamp()); $i <= $until->getTimestamp(); $i = strtotime('+1 week', $i)) { if ($i >= $today) { $eventStart = new \DateTime(); diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index 2e94d1c..5ab60de 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -23,7 +23,7 @@ plugin.tx_events { # cat=plugin.tx_events//a; type=string; label=Data Type restType = Event # cat=plugin.tx_events//a; type=string; label=Data Limit - restLimit = 200 + restLimit = 500 # cat=plugin.tx_events//a; type=string; label=Mode restMode = next_months,12 # cat=plugin.tx_events//a; type=string; label=Data Template