mirror of
https://github.com/friendica/friendica
synced 2025-04-22 03:10:10 +00:00
Improved handling for undeterminded languages
This commit is contained in:
parent
6cd0e1e35f
commit
6e830f7774
4 changed files with 79 additions and 72 deletions
|
@ -432,12 +432,8 @@ class Timeline extends BaseModule
|
|||
$conditions = [];
|
||||
$languages = $languages ?: User::getWantedLanguages($uid);
|
||||
foreach ($languages as $language) {
|
||||
if ($language == 'un') {
|
||||
$conditions[] = "`language` IS NULL";
|
||||
} else {
|
||||
$conditions[] = "JSON_EXTRACT(JSON_KEYS(language), '$[0]') = ?";
|
||||
$condition[] = $language;
|
||||
}
|
||||
$conditions[] = "JSON_EXTRACT(JSON_KEYS(language), '$[0]') = ?";
|
||||
$condition[] = $language;
|
||||
}
|
||||
if (!empty($conditions)) {
|
||||
$condition[0] .= " AND (" . implode(' OR ', $conditions) . ")";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue