Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Commit

Permalink
Add 2 elseif cases for iPad and iPod
Browse files Browse the repository at this point in the history
Signed-off-by: Buddhima Wijeweera <buddhimawijeweera@yahoo.com>
  • Loading branch information
Buddhima committed Apr 5, 2012
1 parent 4f132a9 commit 1ecbcfe
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions libraries/joomla/application/web/client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down

0 comments on commit 1ecbcfe

Please sign in to comment.