mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
an other fix for bug #21: Reject entry as part of group, entry still shown (should not):
- 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
This commit is contained in:
parent
8889c6323f
commit
181c6def9e
@ -355,8 +355,17 @@ class bocal
|
||||
$this->total = $this->so->total;
|
||||
$this->db2data($events,isset($params['date_format']) ? $params['date_format'] : 'ts');
|
||||
|
||||
// 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 = !$show_rejected && count($params['users']) == 1 ? $params['users'][0] : false;
|
||||
//echo "<p align=right>remove_rejected_by_user=$remove_rejected_by_user, show_rejected=$show_rejected, params[users]=".print_r($param['users'])."</p>\n";
|
||||
foreach($events as $id => $event)
|
||||
{
|
||||
if ($remove_rejected_by_user && $event['participants'][$remove_rejected_by_user] == 'R')
|
||||
{
|
||||
unset($events[$id]); // remove the rejected event
|
||||
continue;
|
||||
}
|
||||
if ($params['enum_groups'] && $this->enum_groups($event))
|
||||
{
|
||||
$events[$id] = $event;
|
||||
|
Loading…
Reference in New Issue
Block a user