Skip to content

Commit

Permalink
Merge pull request #167 from lem9/chrome_detection
Browse files Browse the repository at this point in the history
Correct detection of the Chrome browser
  • Loading branch information
mynetx committed Feb 12, 2013
2 parents 9702c92 + 5aad30f commit c5ad32e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -5,6 +5,7 @@ phpMyAdmin - ChangeLog
- bug #3779 [core] Problem with backslash in enum fields
- bug #3816 Missing server_processlist.php
- bug #3821 Safari: white page
- Correct detection of the Chrome browser

3.5.6.0 (2013-01-28)
- bug #3593604 [status] Erroneous advisor rule
Expand Down
9 changes: 9 additions & 0 deletions libraries/Config.class.php
Expand Up @@ -208,6 +208,15 @@ function checkClient()
)) {
$this->set('PMA_USR_BROWSER_VER', $log_version[2]);
$this->set('PMA_USR_BROWSER_AGENT', 'KONQUEROR');
// must check Chrome before Safari
} elseif (preg_match(
'@Mozilla/([0-9].[0-9]{1,2})@',
$HTTP_USER_AGENT,
$log_version)
&& preg_match('@Chrome/([0-9]*)@', $HTTP_USER_AGENT, $log_version2)
) {
$this->set('PMA_USR_BROWSER_VER', $log_version[1] . '.' . $log_version2[1]);
$this->set('PMA_USR_BROWSER_AGENT', 'CHROME');
} elseif (preg_match(
'@Mozilla/([0-9].[0-9]{1,2})@',
$HTTP_USER_AGENT,
Expand Down

0 comments on commit c5ad32e

Please sign in to comment.