Properly detect Microsoft Edge in UserOnline.class.php
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 30 Jul 2015 13:29:12 +0000 (15:29 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 30 Jul 2015 13:29:12 +0000 (15:29 +0200)
wcfsetup/install/files/lib/data/user/online/UserOnline.class.php

index 200a3ffad281c6103902b6c94c68372976517866..678396d6e70c2f0157d2f8f52e9b06cc393f2897 100644 (file)
@@ -170,6 +170,10 @@ class UserOnline extends UserProfile {
                        return 'Internet Explorer '.(isset($match[2]) ? $match[2] : $match[1]);
                }
                
+               if (preg_match('~edge/(\d{2}\.\d+)~i', $this->userAgent, $match)) {
+                       return 'Microsoft Edge '.$match[1];
+               }
+               
                // iron
                if (preg_match('~iron/([\d\.]+)~i', $this->userAgent, $match)) {
                        return 'Iron '.$match[1];