mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-20 12:58:46 +01:00
- Add $$user/primary_group$$ common placeholder
- Add calendar_owner/<contact> sub-placeholders, including primary_group
This commit is contained in:
parent
d10dd0b6ed
commit
210ebb5706
@ -204,6 +204,13 @@ class calendar_merge extends bo_merge
|
|||||||
$duration = ($event['end'] - $event['start'])/60;
|
$duration = ($event['end'] - $event['start'])/60;
|
||||||
$replacements['$$'.($prefix?$prefix.'/':'').'calendar_duration$$'] = floor($duration/60).lang('h').($duration%60 ? $duration%60 : '');
|
$replacements['$$'.($prefix?$prefix.'/':'').'calendar_duration$$'] = floor($duration/60).lang('h').($duration%60 ? $duration%60 : '');
|
||||||
|
|
||||||
|
// Add in contact stuff for owner
|
||||||
|
if (strpos($content,'$$calendar_owner/') !== null && ($user = $GLOBALS['egw']->accounts->id2name($event['owner'],'person_id')))
|
||||||
|
{
|
||||||
|
$replacements += $this->contact_replacements($user,($prefix ? $prefix.'/':'').'calendar_owner');
|
||||||
|
$replacements['$$'.($prefix?$prefix.'/':'').'calendar_owner/primary_group$$'] = $GLOBALS['egw']->accounts->id2name($GLOBALS['egw']->accounts->id2name($event['owner'],'account_primary_group'));
|
||||||
|
}
|
||||||
|
|
||||||
if($content && strpos($content, '$$#') !== 0)
|
if($content && strpos($content, '$$#') !== 0)
|
||||||
{
|
{
|
||||||
$this->cf_link_to_expand($event, $content, $replacements);
|
$this->cf_link_to_expand($event, $content, $replacements);
|
||||||
|
@ -765,6 +765,7 @@ abstract class bo_merge
|
|||||||
if (strpos($content,'$$user/') !== null && ($user = $GLOBALS['egw']->accounts->id2name($GLOBALS['egw_info']['user']['account_id'],'person_id')))
|
if (strpos($content,'$$user/') !== null && ($user = $GLOBALS['egw']->accounts->id2name($GLOBALS['egw_info']['user']['account_id'],'person_id')))
|
||||||
{
|
{
|
||||||
$replacements += $this->contact_replacements($user,'user');
|
$replacements += $this->contact_replacements($user,'user');
|
||||||
|
$replacements['$$user/primary_group$$'] = $GLOBALS['egw']->accounts->id2name($GLOBALS['egw']->accounts->id2name($GLOBALS['egw_info']['user']['account_id'],'account_primary_group'));
|
||||||
}
|
}
|
||||||
$replacements['$$date$$'] = egw_time::to('now',true);
|
$replacements['$$date$$'] = egw_time::to('now',true);
|
||||||
$replacements['$$datetime$$'] = egw_time::to('now');
|
$replacements['$$datetime$$'] = egw_time::to('now');
|
||||||
|
Loading…
Reference in New Issue
Block a user