mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Additional patch for Issue 1774 and r10539. Return same value of UA check for a request.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10540 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d4babffdef
commit
532a6a0645
1 changed files with 7 additions and 2 deletions
|
|
@ -96,8 +96,8 @@ class Mobile {
|
|||
|
||||
function isMobileCheckByAgent()
|
||||
{
|
||||
static $UACheck = NULL;
|
||||
if($UACheck !== NULL) return $UACheck;
|
||||
static $UACheck;
|
||||
if(isset($UACheck)) return $UACheck;
|
||||
|
||||
$oMobile =& Mobile::getInstance();
|
||||
$mobileAgent = array('iPod','iPhone','Android','BlackBerry','SymbianOS','Bada','Kindle','Wii','SCH-','SPH-','CANU-','Windows Phone','Windows CE','POLARIS','Palm','Dorothy Browser','IEMobile','Opera Mobi','Opera Mini','MobileExplorer','Minimo','AvantGo','NetFront','Googlebot-Mobile','Nokia','LGPlayer','SonyEricsson','HTC','SKT','lgtelecom','Vodafone');
|
||||
|
|
@ -126,6 +126,8 @@ class Mobile {
|
|||
*/
|
||||
function isMobilePadCheckByAgent()
|
||||
{
|
||||
static $UACheck;
|
||||
if(isset($UACheck)) return $UACheck;
|
||||
$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.
|
||||
|
|
@ -137,15 +139,18 @@ class Mobile {
|
|||
{
|
||||
if(!isset($exceptionAgent[$agent]))
|
||||
{
|
||||
$UACheck = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
elseif(strpos($_SERVER['HTTP_USER_AGENT'], $exceptionAgent[$agent]) === FALSE)
|
||||
{
|
||||
$UACheck = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$UACheck = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue