Seperate birthday cache by language

This commit is contained in:
nathangray 2018-06-11 11:26:08 -06:00
parent 460206a208
commit d201dc9fd9

View File

@ -1726,7 +1726,7 @@ class Contacts extends Contacts\Storage
*/ */
public function read_birthdays($addressbook, $year) public function read_birthdays($addressbook, $year)
{ {
if (($birthdays = Cache::getInstance(__CLASS__,"birthday-$year-$addressbook")) !== null) if (($birthdays = Cache::getInstance(__CLASS__,"birthday-$year-$addressbook-".$GLOBALS['egw_info']['user']['preferences']['common']['lang'])) !== null)
{ {
return $birthdays; return $birthdays;
} }
@ -1774,7 +1774,7 @@ class Contacts extends Contacts\Storage
); );
} }
} }
Cache::setInstance(__CLASS__,"birthday-$year-$addressbook", $birthdays, self::BIRTHDAY_CACHE_TIME); Cache::setInstance(__CLASS__,"birthday-$year-$addressbook-".$GLOBALS['egw_info']['user']['preferences']['common']['lang'], $birthdays, self::BIRTHDAY_CACHE_TIME);
return $birthdays; return $birthdays;
} }