From 05c6ffa81d0dd55b5cccb32b7dd9d2a0ea5b8784 Mon Sep 17 00:00:00 2001 From: Niels Leenheer Date: Mon, 9 Nov 2015 13:19:34 +0100 Subject: [PATCH] Built WhichBrowser from commit cc04aea on WhichBrowser/WhichBrowser on branch dev --- libraries/whichbrowser.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libraries/whichbrowser.php b/libraries/whichbrowser.php index 24a767e..fd855f5 100644 --- a/libraries/whichbrowser.php +++ b/libraries/whichbrowser.php @@ -5550,8 +5550,13 @@ function analyseUserAgent($ua) { } } - if (preg_match('/midori$/u', $ua)) { + if (preg_match('/midori(?:\/[0-9.]*)?$/u', $ua)) { $this->browser->name = 'Midori'; + $this->device->type = TYPE_DESKTOP; + + if (preg_match('/midori\/([0-9.]*)$/u', $ua, $match)) { + $this->browser->version = new Version(array('value' => $match[1])); + } } @@ -5755,7 +5760,7 @@ function analyseUserAgent($ua) { array('name' => 'Galeon', 'regexp' => '/Galeon\/([0-9.]*)/u', 'details' => 3), array('name' => 'Helium', 'regexp' => '/HeliumMobileBrowser\/([0-9.]*)/u'), array('name' => 'Hive Explorer', 'regexp' => '/HiveE/u'), - array('name' => 'IBrowse', 'regexp' => '/IBrowse\/([0-9.]*)/u', 'type' => TYPE_DESKTOP), + array('name' => 'IBrowse', 'regexp' => '/IBrowse[\/ ]([0-9.]*)/u', 'type' => TYPE_DESKTOP), array('name' => 'iCab', 'regexp' => '/iCab\/([0-9.]*)/u'), array('name' => 'Iceape', 'regexp' => '/Iceape\/([0-9.]*)/u'), array('name' => 'IceCat', 'regexp' => '/IceCat[ \/]([0-9.]*)/u', 'type' => TYPE_DESKTOP),