@@ 785-804 (lines=20) @@ | ||
782 | * |
|
783 | * @return bool |
|
784 | */ |
|
785 | public static function checkBrowserFirefox() |
|
786 | { |
|
787 | if (stripos(self::$userAgentString, 'safari') === false) { |
|
788 | if (preg_match("/Firefox[\\/ \\(]([a-zA-Z\\d\\.]*)/i", self::$userAgentString, $matches)) { |
|
789 | if (isset($matches[1])) { |
|
790 | self::$browser->setVersion($matches[1]); |
|
791 | } |
|
792 | self::$browser->setName(Browser::FIREFOX); |
|
793 | ||
794 | return true; |
|
795 | } elseif (preg_match('/Firefox$/i', self::$userAgentString, $matches)) { |
|
796 | self::$browser->setVersion(''); |
|
797 | self::$browser->setName(Browser::FIREFOX); |
|
798 | ||
799 | return true; |
|
800 | } |
|
801 | } |
|
802 | ||
803 | return false; |
|
804 | } |
|
805 | ||
806 | /** |
|
807 | * Determine if the browser is SeaMonkey. |
|
@@ 811-830 (lines=20) @@ | ||
808 | * |
|
809 | * @return bool |
|
810 | */ |
|
811 | public static function checkBrowserSeaMonkey() |
|
812 | { |
|
813 | if (stripos(self::$userAgentString, 'safari') === false) { |
|
814 | if (preg_match("/SeaMonkey[\\/ \\(]([a-zA-Z\\d\\.]*)/i", self::$userAgentString, $matches)) { |
|
815 | if (isset($matches[1])) { |
|
816 | self::$browser->setVersion($matches[1]); |
|
817 | } |
|
818 | self::$browser->setName(Browser::SEAMONKEY); |
|
819 | ||
820 | return true; |
|
821 | } elseif (preg_match('/SeaMonkey$/i', self::$userAgentString, $matches)) { |
|
822 | self::$browser->setVersion(''); |
|
823 | self::$browser->setName(Browser::SEAMONKEY); |
|
824 | ||
825 | return true; |
|
826 | } |
|
827 | } |
|
828 | ||
829 | return false; |
|
830 | } |
|
831 | ||
832 | /** |
|
833 | * Determine if the browser is Iceweasel. |