@@ 849-868 (lines=20) @@ | ||
846 | * |
|
847 | * @return bool |
|
848 | */ |
|
849 | public static function checkBrowserFirefox() |
|
850 | { |
|
851 | if (stripos(self::$userAgentString, 'safari') === false) { |
|
852 | if (preg_match("/Firefox[\\/ \\(]([a-zA-Z\\d\\.]*)/i", self::$userAgentString, $matches)) { |
|
853 | if (isset($matches[1])) { |
|
854 | self::$browser->setVersion($matches[1]); |
|
855 | } |
|
856 | self::$browser->setName(Browser::FIREFOX); |
|
857 | ||
858 | return true; |
|
859 | } elseif (preg_match('/Firefox$/i', self::$userAgentString, $matches)) { |
|
860 | self::$browser->setVersion(''); |
|
861 | self::$browser->setName(Browser::FIREFOX); |
|
862 | ||
863 | return true; |
|
864 | } |
|
865 | } |
|
866 | ||
867 | return false; |
|
868 | } |
|
869 | ||
870 | /** |
|
871 | * Determine if the browser is SeaMonkey. |
|
@@ 875-894 (lines=20) @@ | ||
872 | * |
|
873 | * @return bool |
|
874 | */ |
|
875 | public static function checkBrowserSeaMonkey() |
|
876 | { |
|
877 | if (stripos(self::$userAgentString, 'safari') === false) { |
|
878 | if (preg_match("/SeaMonkey[\\/ \\(]([a-zA-Z\\d\\.]*)/i", self::$userAgentString, $matches)) { |
|
879 | if (isset($matches[1])) { |
|
880 | self::$browser->setVersion($matches[1]); |
|
881 | } |
|
882 | self::$browser->setName(Browser::SEAMONKEY); |
|
883 | ||
884 | return true; |
|
885 | } elseif (preg_match('/SeaMonkey$/i', self::$userAgentString, $matches)) { |
|
886 | self::$browser->setVersion(''); |
|
887 | self::$browser->setName(Browser::SEAMONKEY); |
|
888 | ||
889 | return true; |
|
890 | } |
|
891 | } |
|
892 | ||
893 | return false; |
|
894 | } |
|
895 | ||
896 | /** |
|
897 | * Determine if the browser is Iceweasel. |