mirror of
https://github.com/friendica/friendica
synced 2025-04-22 05:50:13 +00:00
Check for user defined channel matches before storing them
This commit is contained in:
parent
e2891a660a
commit
43f9be367f
13 changed files with 236 additions and 42 deletions
|
@ -582,6 +582,12 @@ class User
|
|||
*/
|
||||
public static function getLanguages(): array
|
||||
{
|
||||
$cachekey = 'user:getLanguages';
|
||||
$languages = DI::cache()->get($cachekey);
|
||||
if (!is_null($languages)) {
|
||||
return $languages;
|
||||
}
|
||||
|
||||
$supported = array_keys(DI::l10n()->getLanguageCodes());
|
||||
$languages = [];
|
||||
$uids = [];
|
||||
|
@ -620,7 +626,10 @@ class User
|
|||
DBA::close($channels);
|
||||
|
||||
ksort($languages);
|
||||
return array_keys($languages);
|
||||
$languages = array_keys($languages);
|
||||
DI::cache()->set($cachekey, $languages);
|
||||
|
||||
return $languages;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue