| @@ 723-742 (lines=20) @@ | ||
| 720 | * |
|
| 721 | * @return bool |
|
| 722 | */ |
|
| 723 | public static function checkBrowserFirefox() |
|
| 724 | { |
|
| 725 | if (stripos(self::$userAgentString, 'safari') === false) { |
|
| 726 | if (preg_match("/Firefox[\/ \(]([^ ;\)]+)/i", self::$userAgentString, $matches)) { |
|
| 727 | if (isset($matches[1])) { |
|
| 728 | self::$browser->setVersion($matches[1]); |
|
| 729 | } |
|
| 730 | self::$browser->setName(Browser::FIREFOX); |
|
| 731 | ||
| 732 | return true; |
|
| 733 | } elseif (preg_match('/Firefox$/i', self::$userAgentString, $matches)) { |
|
| 734 | self::$browser->setVersion(''); |
|
| 735 | self::$browser->setName(Browser::FIREFOX); |
|
| 736 | ||
| 737 | return true; |
|
| 738 | } |
|
| 739 | } |
|
| 740 | ||
| 741 | return false; |
|
| 742 | } |
|
| 743 | ||
| 744 | /** |
|
| 745 | * Determine if the browser is SeaMonkey. |
|
| @@ 749-768 (lines=20) @@ | ||
| 746 | * |
|
| 747 | * @return bool |
|
| 748 | */ |
|
| 749 | public static function checkBrowserSeaMonkey() |
|
| 750 | { |
|
| 751 | if (stripos(self::$userAgentString, 'safari') === false) { |
|
| 752 | if (preg_match("/SeaMonkey[\/ \(]([^ ;\)]+)/i", self::$userAgentString, $matches)) { |
|
| 753 | if (isset($matches[1])) { |
|
| 754 | self::$browser->setVersion($matches[1]); |
|
| 755 | } |
|
| 756 | self::$browser->setName(Browser::SEAMONKEY); |
|
| 757 | ||
| 758 | return true; |
|
| 759 | } elseif (preg_match('/SeaMonkey$/i', self::$userAgentString, $matches)) { |
|
| 760 | self::$browser->setVersion(''); |
|
| 761 | self::$browser->setName(Browser::SEAMONKEY); |
|
| 762 | ||
| 763 | return true; |
|
| 764 | } |
|
| 765 | } |
|
| 766 | ||
| 767 | return false; |
|
| 768 | } |
|
| 769 | ||
| 770 | /** |
|
| 771 | * Determine if the browser is Iceweasel. |
|