Seperate birthday cache by language

This commit is contained in:
nathangray 2018-06-11 11:26:08 -06:00
parent 5802b8b194
commit 0b6968447a

View File

@ -1722,7 +1722,7 @@ class Contacts extends Contacts\Storage
*/
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;
}
@ -1770,7 +1770,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;
}