@@ 770-789 (lines=20) @@ | ||
767 | * |
|
768 | * @return bool |
|
769 | */ |
|
770 | public static function checkBrowserFirefox() |
|
771 | { |
|
772 | if (stripos(self::$userAgentString, 'safari') === false) { |
|
773 | if (preg_match("/Firefox[\\/ \\(]([a-zA-Z\\d\\.]*)/i", self::$userAgentString, $matches)) { |
|
774 | if (isset($matches[1])) { |
|
775 | self::$browser->setVersion($matches[1]); |
|
776 | } |
|
777 | self::$browser->setName(Browser::FIREFOX); |
|
778 | ||
779 | return true; |
|
780 | } elseif (preg_match('/Firefox$/i', self::$userAgentString, $matches)) { |
|
781 | self::$browser->setVersion(''); |
|
782 | self::$browser->setName(Browser::FIREFOX); |
|
783 | ||
784 | return true; |
|
785 | } |
|
786 | } |
|
787 | ||
788 | return false; |
|
789 | } |
|
790 | ||
791 | /** |
|
792 | * Determine if the browser is SeaMonkey. |
|
@@ 796-815 (lines=20) @@ | ||
793 | * |
|
794 | * @return bool |
|
795 | */ |
|
796 | public static function checkBrowserSeaMonkey() |
|
797 | { |
|
798 | if (stripos(self::$userAgentString, 'safari') === false) { |
|
799 | if (preg_match("/SeaMonkey[\\/ \\(]([a-zA-Z\\d\\.]*)/i", self::$userAgentString, $matches)) { |
|
800 | if (isset($matches[1])) { |
|
801 | self::$browser->setVersion($matches[1]); |
|
802 | } |
|
803 | self::$browser->setName(Browser::SEAMONKEY); |
|
804 | ||
805 | return true; |
|
806 | } elseif (preg_match('/SeaMonkey$/i', self::$userAgentString, $matches)) { |
|
807 | self::$browser->setVersion(''); |
|
808 | self::$browser->setName(Browser::SEAMONKEY); |
|
809 | ||
810 | return true; |
|
811 | } |
|
812 | } |
|
813 | ||
814 | return false; |
|
815 | } |
|
816 | ||
817 | /** |
|
818 | * Determine if the browser is Iceweasel. |