From 0e81e29ef7b793654916c83c5eaf4039e717968e Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 18 Sep 2013 14:42:23 +0200 Subject: [PATCH] Fixed browser (Opera) detection --- .../files/lib/data/user/online/UserOnline.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/data/user/online/UserOnline.class.php b/wcfsetup/install/files/lib/data/user/online/UserOnline.class.php index 56f9e8f546..595176c1f2 100644 --- a/wcfsetup/install/files/lib/data/user/online/UserOnline.class.php +++ b/wcfsetup/install/files/lib/data/user/online/UserOnline.class.php @@ -85,11 +85,16 @@ class UserOnline extends UserProfile { * @return string */ public function getBrowser() { - // opera + // opera 12 if (preg_match('~opera.*version/([\d\.]+)~i', $this->userAgent, $match)) { return 'Opera '.$match[1]; } + // opera 15+ + if (preg_match('~opr/([\d\.]+)~i', $this->userAgent, $match)) { + return 'Opera '.$match[1]; + } + // firefox if (preg_match('~firefox/([\d\.]+)~i', $this->userAgent, $match)) { return 'Firefox '.$match[1]; -- 2.20.1