From 6f08893016977a6a4b767bde1bb4259df72af562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 16 Feb 2015 12:26:20 +0100 Subject: [PATCH 1/2] Fix: [ bug #1846 ] Browser IE11 not detected --- ChangeLog | 1 + htdocs/core/lib/functions.lib.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 29fadcba4fc..31e0bad5a16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ Fix: [ bug #1752 ] Date filter of margins module, filters since 12H instead of 0 Fix: [ bug #1757 ] Sorting breaks product/service statistics Fix: [ bug #1797 ] Tulip supplier invoice module takes creation date instead of invoice date Fix: [ bug #1792 ] Users are not allowed to see margins module index page when no product view permission is enabled +Fix: [ bug #1846 ] Browser IE11 not detected ***** ChangeLog for 3.5.6 compared to 3.5.5 ***** Fix: Avoid missing class error for fetch_thirdparty method #1973 diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b5bac3b0ab0..85e4b68f519 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -10,6 +10,7 @@ * Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2014-2015 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -146,7 +147,7 @@ function getBrowserInfo() elseif (preg_match('/epiphany/i',$_SERVER["HTTP_USER_AGENT"])) { $name='epiphany'; $version=$reg[2]; } elseif ((empty($phone) || preg_match('/iphone/i',$_SERVER["HTTP_USER_AGENT"])) && preg_match('/safari(\/|\s)([\d\.]*)/i',$_SERVER["HTTP_USER_AGENT"], $reg)) { $name='safari'; $version=$reg[2]; } // Safari is often present in string for mobile but its not. elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='opera'; $version=$reg[2]; } - elseif (preg_match('/msie(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='ie'; $version=$reg[2]; } // MS products at end + elseif (preg_match('/(MSIE\s([0-9]+\.[0-9]))|.*(Trident\/[0-9]+.[0-9];\srv:([0-9]+\.[0-9]+))/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='ie'; $version= end($reg); } // MS products at end // Other $firefox=0; if (in_array($name,array('firefox','iceweasel'))) $firefox=1; From 3efb737cbf685501752a6c69131b8d79cf07bbde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 16 Feb 2015 12:30:10 +0100 Subject: [PATCH 2/2] Fix: [ bug #1845 ] Undefined "$conf->browser->ie" var in "functions.lib.php" --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 85e4b68f519..687c8d3d855 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2516,7 +2516,7 @@ function load_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpath $return=''; if ($picto == 'setup') $picto='title.png'; - if (!empty($conf->browser->ie) && $picto=='title.png') $picto='title.gif'; + if (($conf->browser->name == 'ie') && $picto=='title.png') $picto='title.gif'; $return.= "\n"; $return.= ''; @@ -2554,7 +2554,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so global $conf,$langs; if ($picto == 'setup') $picto='title.png'; - if (!empty($conf->browser->ie) && $picto=='title.png') $picto='title.gif'; + if (($conf->browser->name == 'ie') && $picto=='title.png') $picto='title.gif'; if (($num > $conf->liste_limit) || ($num == -1)) {