Changed “langs” function so that, if “api/v1/instance” returned a language different from the default en, it assumes it is right, because it has been explicitly set, and avoid doing autodection of languages based on last toots
This commit is contained in:
parent
56c1e85893
commit
9b87447da0
1 changed files with 3 additions and 0 deletions
|
@ -586,6 +586,9 @@ function langs($instid, $uri, $auto) {
|
|||
global $info, $instrow, $link, $opts;
|
||||
$retlangs=array();
|
||||
$languages=array();
|
||||
// even if $auto is true, set it to false (don't do autodection of languages based on last toots) if api/v1/instance returned a language different from the default "en": assume instead it is right, because it has been explicitly set
|
||||
if (isset($info['languages'][0]) && $info['languages'][0]!='en')
|
||||
$auto=false;
|
||||
if ($auto) {
|
||||
$languages = get_instance_langs($uri);
|
||||
} elseif (akeavinn('languages',$info)) {
|
||||
|
|
Loading…
Reference in a new issue