contao/test — Issue #153: upcoming events - small change in logic for displaying events?
Author: computino
Created: 2011-11-28 16:17:55+00:00
State: open
Labels: calendar, Defect

In upcoming events when using "cal_noSpan" it is always the startDate used as a reference / array key. For multiday-events, the event will not be displayed as soon as the start date is over. Currently I have something like that: the IAA Nutzfahrzeuge is opened from 25.09. till 02.10. From 26.09. the event was no longer displayed, although in my opinion (and more important: the customers) the date is still "upcoming".

I changed very little code to change it to a more suitable logic:

```
Events->addEvent line 272ff
if ($this->cal_noSpan)
{
$intDate = $intEnd?$intEnd:$intStart;
$intKey = date('Ymd', $intEnd?$intEnd:$intStart);
}
$this->arrEvents[$intKey][$intDate][] = $arrEvent;
```

It works like a charm with the short and long version of upcoming events.

--- _Originally created on October 1st, 2008, at 03:19pm (ID 153)_