|
2 | 2 | /** |
3 | 3 | * File: Browser.php |
4 | 4 | * Author: Chris Schuld (http://chrisschuld.com/) |
5 | | - * Last Modified: August 20th, 2010 |
6 | | - * @version 1.9 |
| 5 | + * Last Modified: March 11th, 2013 |
| 6 | + * @version 1.10 |
7 | 7 | * @package PegasusPHP |
8 | 8 | * |
9 | 9 | * Copyright (C) 2008-2010 Chris Schuld ([email protected]) |
|
34 | 34 | * |
35 | 35 | * UPDATES: |
36 | 36 | * |
| 37 | + * 2013-03-08 (v1.10): |
| 38 | + * + Added SeaMonkey Browser |
| 39 | + * |
37 | 40 | * 2010-08-20 (v1.9): |
38 | 41 | * + Added MSN Explorer Browser (legacy) |
39 | 42 | * + Added Bing/MSN Robot (Thanks Rob MacDonald) |
@@ -156,6 +159,7 @@ class Browser { |
156 | 159 | const BROWSER_OMNIWEB = 'OmniWeb'; // http://www.omnigroup.com/applications/omniweb/ |
157 | 160 | const BROWSER_FIREBIRD = 'Firebird'; // http://www.ibphoenix.com/ |
158 | 161 | const BROWSER_FIREFOX = 'Firefox'; // http://www.mozilla.com/en-US/firefox/firefox.html |
| 162 | + const BROWSER_SEAMONKEY = 'SeaMonkey'; // http://www.seamonkey-project.org/ |
159 | 163 | const BROWSER_ICEWEASEL = 'Iceweasel'; // http://www.geticeweasel.org/ |
160 | 164 | const BROWSER_SHIRETOKO = 'Shiretoko'; // http://wiki.mozilla.org/Projects/shiretoko |
161 | 165 | const BROWSER_MOZILLA = 'Mozilla'; // http://www.mozilla.com/en-US/ |
@@ -369,6 +373,7 @@ protected function checkBrowsers() { |
369 | 373 | $this->checkBrowserOpera() || |
370 | 374 | $this->checkBrowserGaleon() || |
371 | 375 | $this->checkBrowserNetscapeNavigator9Plus() || |
| 376 | + $this->checkBrowserSeaMonkey() || |
372 | 377 | $this->checkBrowserFirefox() || |
373 | 378 | $this->checkBrowserChrome() || |
374 | 379 | $this->checkBrowserOmniWeb() || |
@@ -815,6 +820,26 @@ protected function checkBrowserFirefox() { |
815 | 820 | } |
816 | 821 | return false; |
817 | 822 | } |
| 823 | + |
| 824 | + /** |
| 825 | + * Determine if the browser is SeaMonkey or not (last updated 1.10) |
| 826 | + * @return boolean True if the browser is SeaMonkey otherwise false |
| 827 | + */ |
| 828 | + protected function checkBrowserSeaMonkey() { |
| 829 | + if( stripos($this->_agent,'safari') === false ) { |
| 830 | + if( preg_match("/SeaMonkey[\/ \(]([^ ;\)]+)/i",$this->_agent,$matches) ) { |
| 831 | + $this->setVersion($matches[1]); |
| 832 | + $this->setBrowser(self::BROWSER_SEAMONKEY); |
| 833 | + return true; |
| 834 | + } |
| 835 | + else if( preg_match("/SeaMonkey$/i",$this->_agent,$matches) ) { |
| 836 | + $this->setVersion(""); |
| 837 | + $this->setBrowser(self::BROWSER_SEAMONKEY); |
| 838 | + return true; |
| 839 | + } |
| 840 | + } |
| 841 | + return false; |
| 842 | + } |
818 | 843 |
|
819 | 844 | /** |
820 | 845 | * Determine if the browser is Firefox or not (last updated 1.7) |
|
0 commit comments