Permalink
Browse files

Detect Firefox browser

  • Loading branch information...
1 parent bd46d10 commit 1de35ef88bf805d7c1dfae1a2c2dcac250170cd2 J.M committed Apr 8, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 libraries/Config.class.php
@@ -242,6 +242,14 @@ function checkClient()
'PMA_USR_BROWSER_VER', $log_version[1] . '.' . $log_version2[1]
);
$this->set('PMA_USR_BROWSER_AGENT', 'SAFARI');
+ // Firefox
+ } elseif (! strstr($HTTP_USER_AGENT, 'compatible')
+ && preg_match('@Firefox/([\w.]+)@', $HTTP_USER_AGENT, $log_version2)
+ ) {
+ $this->set(
+ 'PMA_USR_BROWSER_VER', $log_version2[1]
+ );
+ $this->set('PMA_USR_BROWSER_AGENT', 'FIREFOX');
} elseif (preg_match('@rv:1.9(.*)Gecko@', $HTTP_USER_AGENT)) {
$this->set('PMA_USR_BROWSER_VER', '1.9');
$this->set('PMA_USR_BROWSER_AGENT', 'GECKO');

0 comments on commit 1de35ef

Please sign in to comment.