forked from extern/egroupware
fixed under some conditions not working translations, caused by egw object calling translation::init and preceeding lang_arr with (en) translations, before lang.php calls add_app() with a single translation, now explicitly calling init() and init() allways empties lang_arr
This commit is contained in:
parent
288f46aafd
commit
95b89a0c9f
@ -192,9 +192,10 @@ class translation
|
||||
//error_log(__METHOD__."() load_via set from config to ".array2string(self::$load_via));
|
||||
}
|
||||
|
||||
self::$lang_arr = self::$loaded_apps = array();
|
||||
|
||||
if ($load_translations)
|
||||
{
|
||||
self::$lang_arr = self::$loaded_apps = array();
|
||||
if ($GLOBALS['egw_info']['user']['preferences']['common']['lang'])
|
||||
{
|
||||
self::$userlang = $GLOBALS['egw_info']['user']['preferences']['common']['lang'];
|
||||
@ -275,6 +276,7 @@ class translation
|
||||
*/
|
||||
static function add_app($apps, $lang=null)
|
||||
{
|
||||
//error_log(__METHOD__."(".array2string($apps).", $lang) count(self::\$lang_arr)=".count(self::$lang_arr));
|
||||
//$start = microtime(true);
|
||||
if (!$lang) $lang = self::$userlang;
|
||||
$tree_level = $instance_level = array();
|
||||
|
@ -51,6 +51,7 @@ if (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $
|
||||
common::egw_exit();
|
||||
}
|
||||
|
||||
translation::init(false);
|
||||
translation::add_app($_GET['app'], $_GET['lang']);
|
||||
if (!count(translation::$lang_arr))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user