Skip to content

Commit

Permalink
Cron: CSV import: Fix data collection in events import (contributed b…
Browse files Browse the repository at this point in the history
…y Laurent Goossens) - refs BT#20405
  • Loading branch information
ywarnier committed Mar 10, 2023
1 parent 82c3fdb commit cbb7e6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main/cron/import_csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -1264,9 +1264,9 @@ private function importCalendarStatic($file, $moveFile = true)
if ($sessionInfo && !empty($sessionInfo['access_start_date'])) {
$date = new \DateTime($sessionInfo['access_start_date']);
$intervalInput = '7';
if (!empty($sessionInfo['dateinterval'])) {
if ((int) $sessionInfo['dateinterval'] >= 0) {
$intervalInput = (int) $sessionInfo['dateinterval'];
if (!empty($row['dateinterval'])) {
if ((int) $row['dateinterval'] >= 0) {
$intervalInput = (int) $row['dateinterval'];
}
}
$interval = new \DateInterval('P'.$intervalInput.'D');
Expand Down

0 comments on commit cbb7e6e

Please sign in to comment.