모바일 뷰어 사용중일 경우 모바일 최적화 화면 문구 뜨도록 개선

This commit is contained in:
BJRambo 2015-01-13 17:28:44 +09:00
parent 1f9844ed08
commit 4b1025e8c5
3 changed files with 9 additions and 7 deletions

View file

@ -52,9 +52,7 @@ class Mobile
{
return $this->ismobile;
}
$db_info = Context::getDBInfo();
if($db_info->use_mobile_view != "Y" || Context::get('full_browse') || $_COOKIE["FullBrowse"])
if(Mobile::isMobileEnabled() === false || Context::get('full_browse') || $_COOKIE["FullBrowse"])
{
return ($this->ismobile = false);
}
@ -234,5 +232,10 @@ class Mobile
$oMobile->ismobile = $ismobile;
}
function isMobileEnabled()
{
$db_info = Context::getDBInfo();
return ($db_info->use_mobile_view === 'Y');
}
}
?>

View file

@ -667,8 +667,8 @@ class ModuleHandler extends Handler
'dispEditorConfigPreview' => 1,
'dispLayoutPreviewWithModule' => 1
);
$db_info = Context::getDBInfo();
if($type == "view" && $this->module_info->use_mobile == "Y" && Mobile::isMobileCheckByAgent() && !isset($skipAct[Context::get('act')]) && $db_info->use_mobile_view == "Y")
$db_use_mobile = Mobile::isMobileEnabled();
if($type == "view" && $this->module_info->use_mobile == "Y" && Mobile::isMobileCheckByAgent() && !isset($skipAct[Context::get('act')]) && $db_use_mobile === true)
{
global $lang;
$header = '<style>div.xe_mobile{opacity:0.7;margin:1em 0;padding:.5em;background:#333;border:1px solid #666;border-left:0;border-right:0}p.xe_mobile{text-align:center;margin:1em 0}a.xe_mobile{color:#ff0;font-weight:bold;font-size:24px}@media only screen and (min-width:500px){a.xe_mobile{font-size:15px}}</style>';

View file

@ -606,8 +606,7 @@ class menuAdminController extends menu
$cmArgs->is_skin_fix = 'N';
$cmArgs->is_mskin_fix = 'N';
$db_info = Context::getDBInfo();
if($db_info->use_mobile_view == 'Y')
if(Mobile::isMobileEnabled() === true)
{
$cmArgs->use_mobile = 'Y';
}