Permalink
Browse files

Add 2 elseif cases for iPad and iPod

Signed-off-by: Buddhima Wijeweera <buddhimawijeweera@yahoo.com>
  • Loading branch information...
1 parent 4f132a9 commit 1ecbcfef39bfd1cb29349e52b4297bee8adf6d53 @Buddhima Buddhima committed Apr 5, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 libraries/joomla/application/web/client.php
View
12 libraries/joomla/application/web/client.php
@@ -417,6 +417,18 @@ protected function detectPlatform($userAgent)
$this->platform = self::IPOD;
}
}
+ // In case where iPhone is not mentioed in iPad user agent string
+ elseif (stripos($userAgent, 'iPad') !== false)
+ {
+ $this->mobile = true;
+ $this->platform = self::IPAD;
+ }
+ // In case where iPhone is not mentioed in iPod user agent string
+ elseif (stripos($userAgent, 'iPod') !== false)
+ {
+ $this->mobile = true;
+ $this->platform = self::IPOD;
+ }
// This has to come after the iPhone check because mac strings are also present in iOS devices.
elseif (preg_match('/macintosh|mac os x/i', $userAgent))
{

0 comments on commit 1ecbcfe

Please sign in to comment.