mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-17 02:41:02 +01:00
fixed warning if tagWholeDayOnTop($dayEvents) is called with no array, eg. false because no events found
This commit is contained in:
parent
8c1e245925
commit
74383ecb15
@ -2207,31 +2207,37 @@ class calendar_uiviews extends calendar_ui
|
|||||||
function tagWholeDayOnTop($dayEvents)
|
function tagWholeDayOnTop($dayEvents)
|
||||||
{
|
{
|
||||||
$this->extraRows = $this->extraRowsOriginal;
|
$this->extraRows = $this->extraRowsOriginal;
|
||||||
foreach ($dayEvents as $day=>$oneDayEvents)
|
|
||||||
|
if (is_array($dayEvents))
|
||||||
{
|
{
|
||||||
$extraRowsToAdd = 0;
|
foreach ($dayEvents as $day=>$oneDayEvents)
|
||||||
foreach ($oneDayEvents as $num=>$event)
|
|
||||||
{
|
{
|
||||||
$start = $this->bo->date2array($event['start']);
|
$extraRowsToAdd = 0;
|
||||||
$end = $this->bo->date2array($event['end']);
|
foreach ($oneDayEvents as $num => $event)
|
||||||
if(!$start['hour'] && !$start['minute'] && $end['hour'] == 23 && $end['minute'] == 59)
|
|
||||||
{
|
{
|
||||||
if($event['non_blocking'])
|
$start = $this->bo->date2array($event['start']);
|
||||||
|
$end = $this->bo->date2array($event['end']);
|
||||||
|
if(!$start['hour'] && !$start['minute'] && $end['hour'] == 23 && $end['minute'] == 59)
|
||||||
{
|
{
|
||||||
$dayEvents[$day][$num]['whole_day_on_top']=true;
|
if($event['non_blocking'])
|
||||||
$this->whole_day_positions[$num]=($this->rowHeight*($num+2));
|
{
|
||||||
$extraRowsToAdd++;
|
$dayEvents[$day][$num]['whole_day_on_top']=true;
|
||||||
}
|
$this->whole_day_positions[$num]=($this->rowHeight*($num+2));
|
||||||
else
|
$extraRowsToAdd++;
|
||||||
{
|
}
|
||||||
$dayEvents[$day][$num]['whole_day']=true;
|
else
|
||||||
|
{
|
||||||
|
$dayEvents[$day][$num]['whole_day']=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// check after every day if we have to increase $this->extraRows
|
||||||
|
if(($this->extraRowsOriginal+$extraRowsToAdd) > $this->extraRows)
|
||||||
|
{
|
||||||
|
$this->extraRows = ($this->extraRowsOriginal+$extraRowsToAdd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// check after every day if we have to increase $this->extraRows
|
}
|
||||||
if(($this->extraRowsOriginal+$extraRowsToAdd) > $this->extraRows) { $this->extraRows = ($this->extraRowsOriginal+$extraRowsToAdd); }
|
|
||||||
}
|
|
||||||
|
|
||||||
return $dayEvents;
|
return $dayEvents;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user