small fix for events lasting more then 2 month, eg. holidays ;-)

This commit is contained in:
Ralf Becker 2010-01-15 04:08:10 +00:00
parent fad791eabd
commit 793aab00b0

View File

@ -1548,7 +1548,17 @@ class calendar_uiviews extends calendar_ui
// end in a different month? // end in a different month?
if ($sort != ($end_sort = date('Y-m',$event['end']))) if ($sort != ($end_sort = date('Y-m',$event['end'])))
{ {
$rows[$end_sort][] =& $events[$key]; while($sort != $end_sort)
{
list($y,$m) = explode('-',$sort);
if (++$m > 12)
{
++$y;
$m = 1;
}
$sort = sprintf('%04d-%02d',$y,$m);
$rows[$sort][] =& $events[$key];
}
} }
} }
else // planner by cat else // planner by cat