Load anonymous user's lang preference for error translation

This commit is contained in:
nathan 2023-08-23 10:15:31 -06:00
parent f39c3b83e4
commit 4420e9662d

View File

@ -208,6 +208,11 @@ class Sharing
}
}
// Load lang preference for error translations
if(empty($GLOBALS['egw_info']['user']['preferences']['common']['lang']))
{
$GLOBALS['egw_info']['user']['preferences'] = (new Preferences(Accounts::id2name('anonymous', 'account_id')))->read();
}
if (empty($token) || !($share = self::$db->select(self::TABLE, '*', array(
'share_token' => $token,
'(share_expires IS NULL OR share_expires > '.self::$db->quote(time(), 'date').')',