mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 09:32:15 +09:00
Fix unnecessary reloading of user lang
This commit is contained in:
parent
d3b78d1d47
commit
455e39cbba
2 changed files with 5 additions and 4 deletions
|
|
@ -863,7 +863,7 @@ class moduleAdminController extends module
|
||||||
$args->site_srl = $site_srl;
|
$args->site_srl = $site_srl;
|
||||||
}
|
}
|
||||||
$output = executeQueryArray('module.getLang', $args);
|
$output = executeQueryArray('module.getLang', $args);
|
||||||
if(!$output->toBool() || !$output->data) return;
|
if(!$output->toBool()) return;
|
||||||
|
|
||||||
$langMap = array();
|
$langMap = array();
|
||||||
foreach($output->data as $lang)
|
foreach($output->data as $lang)
|
||||||
|
|
@ -905,7 +905,8 @@ class moduleAdminController extends module
|
||||||
Rhymix\Framework\Cache::set('site_and_module:user_defined_langs:' . $args->site_srl . ':' . $langCode, $langMap[$langCode], 0, true);
|
Rhymix\Framework\Cache::set('site_and_module:user_defined_langs:' . $args->site_srl . ':' . $langCode, $langMap[$langCode], 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $langMap[Context::getLangType()];
|
$currentLang = Context::getLangType();
|
||||||
|
return isset($langMap[$currentLang]) ? $langMap[$currentLang] : array();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function procModuleAdminSetDesignInfo()
|
public function procModuleAdminSetDesignInfo()
|
||||||
|
|
|
||||||
|
|
@ -1048,11 +1048,11 @@ class moduleController extends module
|
||||||
{
|
{
|
||||||
if($lang === null)
|
if($lang === null)
|
||||||
{
|
{
|
||||||
$lang = Rhymix\Framework\Cache::get('site_and_module:user_defined_langs:' . $args->site_srl . ':' . Context::getLangType());
|
$lang = Rhymix\Framework\Cache::get('site_and_module:user_defined_langs:0:' . Context::getLangType());
|
||||||
if($lang === null)
|
if($lang === null)
|
||||||
{
|
{
|
||||||
$oModuleAdminController = getAdminController('module');
|
$oModuleAdminController = getAdminController('module');
|
||||||
$lang = $oModuleAdminController->makeCacheDefinedLangCode($site_module_info->site_srl);
|
$lang = $oModuleAdminController->makeCacheDefinedLangCode(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue