mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
Better handling for multi-day events - properly show up for each day of the week
This commit is contained in:
parent
f41e44fee7
commit
e70f70f148
@ -82,6 +82,7 @@ class calendar_merge extends bo_merge
|
|||||||
}
|
}
|
||||||
$this->query = $GLOBALS['egw']->session->appsession('session_data','calendar');
|
$this->query = $GLOBALS['egw']->session->appsession('session_data','calendar');
|
||||||
$this->query['users'] = explode(',', $this->query['owner']);
|
$this->query['users'] = explode(',', $this->query['owner']);
|
||||||
|
$this->query['num_rows'] = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -216,7 +217,14 @@ class calendar_merge extends bo_merge
|
|||||||
{
|
{
|
||||||
foreach($list as $key => $event)
|
foreach($list as $key => $event)
|
||||||
{
|
{
|
||||||
$days[date('Ymd',$_date)][date('l',$event['start'])][] = $this->calendar_replacements($event);
|
$start = egw_time::to($event['start'], 'array');
|
||||||
|
$end = egw_time::to($event['end'], 'array');
|
||||||
|
if($start['year'] == $end['year'] && $start['month'] == $end['month'] && $start['day'] == $end['day']) {
|
||||||
|
$dow = date('l',$event['start']);
|
||||||
|
} else {
|
||||||
|
$dow = date('l', strtotime($day));
|
||||||
|
}
|
||||||
|
$days[date('Ymd',$_date)][$dow][] = $this->calendar_replacements($event);
|
||||||
}
|
}
|
||||||
if(strpos($repeat, '$$day/date$$') !== false) {
|
if(strpos($repeat, '$$day/date$$') !== false) {
|
||||||
$date_marker = array('$$day/date$$' => date($GLOBALS['egw_info']['user']['preferences']['common']['dateformat'], strtotime($day)));
|
$date_marker = array('$$day/date$$' => date($GLOBALS['egw_info']['user']['preferences']['common']['dateformat'], strtotime($day)));
|
||||||
|
Loading…
Reference in New Issue
Block a user