Merge pull request #167 from lem9/chrome_detection

Correct detection of the Chrome browser
This commit is contained in:
J.M. 2013-02-12 10:21:05 -08:00
commit c5ad32e00d
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -208,6 +208,15 @@ class PMA_Config
)) {
$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,