Change ModuleHandler to update value of is_mobile when calling Mobile::setMobile (#1746)

This commit is contained in:
Chanyoung Oh 2021-07-16 10:00:57 +09:00 committed by GitHub
parent 98d7f8400b
commit d3ee5083f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -390,6 +390,7 @@ class ModuleHandler extends Handler
if($this->module_info->use_mobile !== 'Y')
{
Mobile::setMobile(FALSE);
$this->is_mobile = Mobile::isFromMobilePhone();
}
$logged_info = Context::get('logged_info');
@ -416,6 +417,7 @@ class ModuleHandler extends Handler
{
$type = $orig_type;
Mobile::setMobile(FALSE);
$this->is_mobile = Mobile::isFromMobilePhone();
$oModule = self::getModuleInstance($this->module, $type, $kind);
}
}
@ -533,6 +535,7 @@ class ModuleHandler extends Handler
{
$type = $orig_type;
Mobile::setMobile(FALSE);
$this->is_mobile = Mobile::isFromMobilePhone();
$oModule = self::getModuleInstance($forward->module, $type, $kind);
}
}