mirror of
https://github.com/friendica/friendica
synced 2025-04-23 01:50:10 +00:00
Only use posts with wanted languages for subscribed tags
This commit is contained in:
parent
541208a6bd
commit
14266a1ca4
4 changed files with 34 additions and 5 deletions
|
@ -575,6 +575,17 @@ class User
|
|||
return DI::l10n()->toISO6391(DI::config()->get('system', 'language'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the wanted languages for a given user
|
||||
*
|
||||
* @param integer $uid
|
||||
* @return array
|
||||
*/
|
||||
public static function getWantedLanguages(int $uid): array
|
||||
{
|
||||
return DI::pConfig()->get($uid, 'channel', 'languages', [User::getLanguageCode($uid)]) ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of all languages that are used by the users
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue