From 3373e4ae1026b4ec729172074a7ec540410ebee4 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Mon, 18 Nov 2013 13:50:01 -0500 Subject: [PATCH] Fix browser version detection and failing tests --- program/lib/Roundcube/rcube_browser.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/program/lib/Roundcube/rcube_browser.php b/program/lib/Roundcube/rcube_browser.php index abef5b5..e53e312 100644 --- a/program/lib/Roundcube/rcube_browser.php +++ b/program/lib/Roundcube/rcube_browser.php @@ -41,7 +41,7 @@ $this->safari = !$this->chrome && (strpos($HTTP_USER_AGENT, 'safari') !== false || strpos($HTTP_USER_AGENT, 'applewebkit') !== false); $this->mz = !$this->ie && !$this->safari && !$this->chrome && !$this->ns && strpos($HTTP_USER_AGENT, 'mozilla') !== false; - if (preg_match('/(mozilla|chrome|msie|opera|safari|applewebkit|khtml)(\s*|\/)([0-9.]+)/', $HTTP_USER_AGENT, $regs)) { + if (preg_match('/(chrome|msie|opera|version|khtml)(\s*|\/)([0-9.]+)/', $HTTP_USER_AGENT, $regs)) { $this->ver = (float) $regs[3]; } else if (preg_match('/rv:([0-9.]+)/', $HTTP_USER_AGENT, $regs)) { -- Gitblit v1.9.1