mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Config/Locales
* if your current language becomes invalid select the first viable one instead of defaulting to LOCALE_EN
This commit is contained in:
@@ -178,9 +178,18 @@ class User
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check
|
// check; pick first viable if failed
|
||||||
if ($loc != LOCALE_EN && !(CFG_LOCALES & (1 << $loc)))
|
if (CFG_LOCALES && !(CFG_LOCALES & (1 << $loc)))
|
||||||
$loc = LOCALE_EN;
|
{
|
||||||
|
foreach (Util::$localeStrings as $idx => $__)
|
||||||
|
{
|
||||||
|
if (CFG_LOCALES & (1 << $idx))
|
||||||
|
{
|
||||||
|
$loc = $idx;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// set
|
// set
|
||||||
if (self::$id)
|
if (self::$id)
|
||||||
|
|||||||
Reference in New Issue
Block a user