Browse Source

Added detection for Firefox 4 and 3.6 (Namoroka) user agent for detecting Firefox browser

ywarnier 14 years ago
parent
commit
74d686d8f0
1 changed files with 6 additions and 1 deletions
  1. 6 1
      main/inc/lib/browser/Browser.php

+ 6 - 1
main/inc/lib/browser/Browser.php

@@ -802,7 +802,7 @@
 	     */
 	    protected function checkBrowserFirefox() {
 		    if( stripos($this->_agent,'safari') === false ) {
-				if( preg_match("/Firefox[\/ \(]([^ ;\)]+)/i",$this->_agent,$matches) ) {
+				if( preg_match("/Firefox[\/ \(-]([^ ;\)]+)/i",$this->_agent,$matches) ) {
 					$this->setVersion($matches[1]);
 					$this->setBrowser(self::BROWSER_FIREFOX);
 					return true;
@@ -812,6 +812,11 @@
 					$this->setBrowser(self::BROWSER_FIREFOX);
 					return true;
 				}
+                else if( preg_match("/Namoroka[\/ \(-]([^ ;\)]+)/i",$this->_agent,$matches) ) {
+                    $this->setVersion($matches[1]);
+                    $this->setBrowser(self::BROWSER_FIREFOX);
+                    return true;
+                }
 			}
 		    return false;
 	    }