Skip to content

Commit

Permalink
[ticket/203] Future all day events are always displayed as current
Browse files Browse the repository at this point in the history
  • Loading branch information
marc1706 committed Jun 5, 2012
1 parent 2acdafd commit 5ae08f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions root/portal/modules/portal_calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ public function get_template_side($module_id)
}

// current events
if((($cur_event['start_time'] + $user->timezone + $user->dst + 86400) >= $today_timestamp && $cur_event['all_day']) ||
if((($cur_event['start_time'] + $user->timezone + $user->dst + 86400) >= $today_timestamp && $cur_event['all_day'] &&
($cur_event['start_time'] + $user->timezone + $user->dst) <= $today_timestamp) ||
(($cur_event['start_time'] + $user->timezone + $user->dst) <= $today_timestamp && ($cur_event['end_time'] + $user->timezone + $user->dst) >= $today_timestamp))
{
$template->assign_block_vars('minical.cur_events', array(
Expand All @@ -228,7 +229,7 @@ public function get_template_side($module_id)
'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url($cur_event['url']) : '',
'EVENT_TITLE' => $cur_event['title'],
'START_TIME' => $user->format_date($cur_event['start_time'], 'j. M Y, H:i'),
'END_TIME' => $user->format_date($cur_event['end_time'], 'j. M Y, H:i'),
'END_TIME' => (!$cur_event['all_day']) ? $user->format_date($cur_event['end_time'], 'j. M Y, H:i') : '',
'EVENT_DESC' => (isset($cur_event['desc']) && $cur_event['desc'] != '') ? $cur_event['desc'] : '',
'ALL_DAY' => (($cur_event['start_time'] - $cur_event['end_time']) == 1) ? true : false,
'MODULE_ID' => $module_id,
Expand Down

0 comments on commit 5ae08f7

Please sign in to comment.