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

skala
ywarnier 15 years ago
parent f6a0e002a5
commit 74d686d8f0
  1. 7
      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;
}

Loading…
Cancel
Save