From 7da2a77993feca5ad2125a8bafd370da007cf805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Ra=C3=B1a?= Date: Mon, 6 Feb 2012 18:37:33 +0100 Subject: [PATCH] Bug #3874 fix flash wrong message when checking flash the flash plugin --- user_portal.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/user_portal.php b/user_portal.php index 39b6707d59..45f42675a5 100644 --- a/user_portal.php +++ b/user_portal.php @@ -228,13 +228,15 @@ else{ //check for flash and message $sniff_notification = ''; - -if (! preg_match("/flash_yes/", $_SESSION['sniff_check_some_activex']) && ! preg_match("/flash_yes/", $_SESSION['sniff_check_some_plugins'])) { - $sniff_notification = Display::return_message(get_lang('NoFlash'), 'warning', true); - //js verification - To annoying of redirecting every time the page - $controller->tpl->assign('sniff_notification', $sniff_notification); -} - +$some_activex=$_SESSION['sniff_check_some_activex']; +$some_plugins=$_SESSION['sniff_check_some_plugins']; +if(!empty($some_activex) || !empty($some_plugins)){ + if (! preg_match("/flash_yes/", $some_activex) && ! preg_match("/flash_yes/", $some_plugins)) { + $sniff_notification = Display::return_message(get_lang('NoFlash'), 'warning', true); + //js verification - To annoying of redirecting every time the page + $controller->tpl->assign('sniff_notification', $sniff_notification); + } +} //$controller->tpl->assign('hot_courses', $controller->return_hot_courses()); $controller->tpl->assign('plugin_courses_block', $controller->return_courses_main_plugin());