mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Issue 1774, fix for Android Opera Mini. reported by '하늘종' http://www.xpressengine.com/freeboard/20708676
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10590 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2a62a0c3c5
commit
442ad51d8f
1 changed files with 18 additions and 3 deletions
|
|
@ -128,14 +128,29 @@ class Mobile {
|
|||
{
|
||||
static $UACheck;
|
||||
if(isset($UACheck)) return $UACheck;
|
||||
$padAgent = array('iPad','webOS','hp-tablet','PlayBook');
|
||||
$padAgent = array('iPad','Android','webOS','hp-tablet','PlayBook');
|
||||
|
||||
// Android with 'Mobile' string is not a tablet-like device, and 'Andoroid' without 'Mobile' string is a tablet-like device.
|
||||
$exceptionAgent = array(0 =>'Opera Mini','Android' => 'Mobile');
|
||||
|
||||
foreach($padAgent as $agent)
|
||||
{
|
||||
if(strpos($_SERVER['HTTP_USER_AGENT'], $agent) !== FALSE)
|
||||
{
|
||||
$UACheck = TRUE;
|
||||
return TRUE;
|
||||
if(!isset($exceptionAgent[$agent]))
|
||||
{
|
||||
$UACheck = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
elseif(strpos($_SERVER['HTTP_USER_AGENT'], $exceptionAgent[$agent]) === FALSE)
|
||||
{
|
||||
// Agent is the Android Opera Mini, it does not have 'Mobile' string.
|
||||
if(strpos($_SERVER['HTTP_USER_AGENT'], $exceptionAgent[0]) === FALSE)
|
||||
{
|
||||
$UACheck = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue