mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
account for imported events that end up having no participants.
This commit is contained in:
parent
b9601ff903
commit
d51ed17fab
@ -1524,12 +1524,15 @@
|
||||
{
|
||||
// Check if the $user is one of the participants or has a read-grant from one of them
|
||||
//
|
||||
foreach($event['participants'] as $uid => $accept)
|
||||
if (isset($event['participants']) && is_array($event['participants']))
|
||||
{
|
||||
if ($this->grants[$uid] & PHPGW_ACL_READ || $uid == $user)
|
||||
foreach($event['participants'] as $uid => $accept)
|
||||
{
|
||||
$grants |= PHPGW_ACL_READ;
|
||||
break;
|
||||
if ($this->grants[$uid] & PHPGW_ACL_READ || $uid == $user)
|
||||
{
|
||||
$grants |= PHPGW_ACL_READ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3137,12 +3140,15 @@
|
||||
);
|
||||
}
|
||||
|
||||
$participants = array();
|
||||
foreach($event['participants'] as $user => $short_status)
|
||||
if (isset($event['participants']) && is_array($event['participants']))
|
||||
{
|
||||
if($GLOBALS['phpgw']->accounts->exists($user))
|
||||
$participants = array();
|
||||
foreach($event['participants'] as $user => $short_status)
|
||||
{
|
||||
$participants[$user] = $GLOBALS['phpgw']->common->grab_owner_name($user).' ('.$this->get_long_status($short_status).')';
|
||||
if($GLOBALS['phpgw']->accounts->exists($user))
|
||||
{
|
||||
$participants[$user] = $GLOBALS['phpgw']->common->grab_owner_name($user).' ('.$this->get_long_status($short_status).')';
|
||||
}
|
||||
}
|
||||
}
|
||||
$var['participants'] = Array(
|
||||
|
@ -3487,14 +3487,17 @@ return;
|
||||
|
||||
$vars['title']['tr_color'] = $this->theme['th_bg'];
|
||||
|
||||
foreach($vars['participants']['data'] as $user => $str)
|
||||
if (isset($vars['participants']['data']) && is_array($vars['participants']['data']))
|
||||
{
|
||||
if ($this->bo->check_perms(PHPGW_ACL_EDIT,0,$user) && ereg('^(.*) \((.*)\)$',$str,$parts))
|
||||
foreach($vars['participants']['data'] as $user => $str)
|
||||
{
|
||||
$vars['participants']['data'][$user] = $parts[1].' (<a href="'.$this->page('edit_status','&cal_id='.$event['id'].'&owner='.$user).'">'.$parts[2].'</a>)';
|
||||
if ($this->bo->check_perms(PHPGW_ACL_EDIT,0,$user) && ereg('^(.*) \((.*)\)$',$str,$parts))
|
||||
{
|
||||
$vars['participants']['data'][$user] = $parts[1].' (<a href="'.$this->page('edit_status','&cal_id='.$event['id'].'&owner='.$user).'">'.$parts[2].'</a>)';
|
||||
}
|
||||
}
|
||||
$vars['participants']['data'] = implode("<br>\n",$vars['participants']['data']);
|
||||
}
|
||||
$vars['participants']['data'] = implode("<br>\n",$vars['participants']['data']);
|
||||
|
||||
foreach($vars as $var)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user