handle calendar replacements (search for events) only when there are calendar replacements required

This commit is contained in:
Klaus Leithoff 2010-05-26 12:53:26 +00:00
parent d4a7d28b31
commit fa71adc0c3

View File

@ -318,9 +318,9 @@ class addressbook_merge // extends bo_merge
{ {
$replacements += $this->contact_replacements($user,'user'); $replacements += $this->contact_replacements($user,'user');
} }
if (strpos($content,'$$calendar/') !== null) if (!(strpos($content,'$$calendar/') === false))
{ {
$replacements += $this->calendar_replacements($id,strpos($content,'$$calendar/-1/') !== null); $replacements += $this->calendar_replacements($id,!(strpos($content,'$$calendar/-1/') === false));
} }
$replacements['$$date$$'] = date($GLOBALS['egw_info']['user']['preferences']['common']['dateformat'],time()+$this->contacts->tz_offset_s); $replacements['$$date$$'] = date($GLOBALS['egw_info']['user']['preferences']['common']['dateformat'],time()+$this->contacts->tz_offset_s);