@@ 702-721 (lines=20) @@ | ||
699 | * |
|
700 | * @return bool |
|
701 | */ |
|
702 | public static function checkBrowserFirefox() |
|
703 | { |
|
704 | if (stripos(self::$userAgentString, 'safari') === false) { |
|
705 | if (preg_match("/Firefox[\/ \(]([^ ;\)]+)/i", self::$userAgentString, $matches)) { |
|
706 | if (isset($matches[1])) { |
|
707 | self::$browser->setVersion($matches[1]); |
|
708 | } |
|
709 | self::$browser->setName(Browser::FIREFOX); |
|
710 | ||
711 | return true; |
|
712 | } elseif (preg_match('/Firefox$/i', self::$userAgentString, $matches)) { |
|
713 | self::$browser->setVersion(''); |
|
714 | self::$browser->setName(Browser::FIREFOX); |
|
715 | ||
716 | return true; |
|
717 | } |
|
718 | } |
|
719 | ||
720 | return false; |
|
721 | } |
|
722 | ||
723 | /** |
|
724 | * Determine if the browser is SeaMonkey. |
|
@@ 728-747 (lines=20) @@ | ||
725 | * |
|
726 | * @return bool |
|
727 | */ |
|
728 | public static function checkBrowserSeaMonkey() |
|
729 | { |
|
730 | if (stripos(self::$userAgentString, 'safari') === false) { |
|
731 | if (preg_match("/SeaMonkey[\/ \(]([^ ;\)]+)/i", self::$userAgentString, $matches)) { |
|
732 | if (isset($matches[1])) { |
|
733 | self::$browser->setVersion($matches[1]); |
|
734 | } |
|
735 | self::$browser->setName(Browser::SEAMONKEY); |
|
736 | ||
737 | return true; |
|
738 | } elseif (preg_match('/SeaMonkey$/i', self::$userAgentString, $matches)) { |
|
739 | self::$browser->setVersion(''); |
|
740 | self::$browser->setName(Browser::SEAMONKEY); |
|
741 | ||
742 | return true; |
|
743 | } |
|
744 | } |
|
745 | ||
746 | return false; |
|
747 | } |
|
748 | ||
749 | /** |
|
750 | * Determine if the browser is Iceweasel. |