mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-11 16:00:45 +01:00
Calendar: fix another case of group events not showing properly
This commit is contained in:
parent
d45397c583
commit
b592b9d009
@ -232,6 +232,24 @@ egw.extend('user', egw.MODULE_GLOBAL, function()
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set account data. This one can be called from the server to pre-fill the cache.
|
||||||
|
*
|
||||||
|
* @param {Array} _data
|
||||||
|
* @param {String} _field
|
||||||
|
*/
|
||||||
|
set_account_cache: function(_data, _field)
|
||||||
|
{
|
||||||
|
for(var account_id in _data)
|
||||||
|
{
|
||||||
|
if (typeof accountData[account_id] === 'undefined')
|
||||||
|
{
|
||||||
|
accountData[account_id] = {};
|
||||||
|
}
|
||||||
|
accountData[account_id][_field] = _data[account_id];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set specified account-data of selected user in an other widget
|
* Set specified account-data of selected user in an other widget
|
||||||
*
|
*
|
||||||
|
@ -708,6 +708,8 @@ class calendar_ui
|
|||||||
{
|
{
|
||||||
if(!$event || !is_array($event)) return false;
|
if(!$event || !is_array($event)) return false;
|
||||||
|
|
||||||
|
static $sent_groups = array();
|
||||||
|
|
||||||
if (!$this->bo->check_perms(Acl::EDIT,$event))
|
if (!$this->bo->check_perms(Acl::EDIT,$event))
|
||||||
{
|
{
|
||||||
$event['class'] .= 'rowNoEdit ';
|
$event['class'] .= 'rowNoEdit ';
|
||||||
@ -786,6 +788,15 @@ class calendar_ui
|
|||||||
calendar_so::split_user($uid, $user_type, $user_id);
|
calendar_so::split_user($uid, $user_type, $user_id);
|
||||||
$type_name = lang($this->bo->resources[$user_type]['app']);
|
$type_name = lang($this->bo->resources[$user_type]['app']);
|
||||||
$event['participant_types'][$type_name ? $type_name : ''][] = $text;
|
$event['participant_types'][$type_name ? $type_name : ''][] = $text;
|
||||||
|
if(is_int($uid) && $uid < 0 && !in_array($uid, $sent_groups))
|
||||||
|
{
|
||||||
|
// Make sure group membership info is on the client
|
||||||
|
Api\Json\Response::get()->apply(
|
||||||
|
'egw.set_account_cache', array(
|
||||||
|
array($uid => $GLOBALS['egw']->accounts->members($uid) ),
|
||||||
|
'account_id'
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$event['date'] = $this->bo->date2string($event['start']);
|
$event['date'] = $this->bo->date2string($event['start']);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user