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