Fix calendar_bo::search() returning all-day events one day later (bug#2602)

This commit is contained in:
Jörg Lehrke 2010-05-17 15:40:06 +00:00
parent 27f1fef944
commit 7ab47224c9
2 changed files with 8 additions and 2 deletions

View File

@ -432,10 +432,16 @@ class calendar_bo
// socal::search() returns rejected group-invitations, as only the user not also the group is rejected
// as we cant remove them efficiantly in SQL, we kick them out here, but only if just one user is displayed
$remove_rejected_by_user = !in_array($filter,array('all','rejected')) && count($params['users']) == 1 ? $params['users'][0] : false;
$remove_rejected_by_user = !in_array($filter,array('all','rejected','owner')) && count($params['users']) == 1 ? $params['users'][0] : false;
//echo "<p align=right>remove_rejected_by_user=$remove_rejected_by_user, filter=$filter, params[users]=".print_r($param['users'])."</p>\n";
foreach($events as $id => $event)
{
if (isset($start) && $event['start'] < $start)
{
unset($events[$id]); // remove former events (e.g. whole day)
$this->total--;
continue;
}
if ($remove_rejected_by_user && $event['participants'][$remove_rejected_by_user] == 'R')
{
unset($events[$id]); // remove the rejected event

View File

@ -521,7 +521,7 @@ class calendar_so
foreach(array_keys($selects) as $key)
{
if ($i >= $countSelects) continue;
$i ++;
$i++;
$selects[$key]['cols'] = $select['cols']; // restore the original cols
//$selects[0]['cols'] = $selects[1]['cols'] = $select['cols']; // restore the original cols
}