From 85833e06f348fea7242ba91ddae38b7a7407f818 Mon Sep 17 00:00:00 2001 From: rillke Date: Fri, 16 May 2014 20:27:13 +0200 Subject: [PATCH] Replace deprecated jQuery.browser with jQuery.client jQuery.browser is deprecated. jQuery.client is a core RL module. Bug: 65371 Change-Id: I040cfba574fa0514a25ec5166d82d86f6f697441 --- MultimediaViewer.php | 26 +++++++++++++++----------- resources/mmv/mmv.base.js | 3 ++- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/MultimediaViewer.php b/MultimediaViewer.php index 69521437c..89e784a8c 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -261,24 +261,28 @@ $wgResourceModules += array( ), 'mmv.routing' => $wgMediaViewerResourceTemplate + array( - 'scripts' => array( - 'mmv/routing/mmv.routing.js', - 'mmv/routing/mmv.routing.Route.js', - 'mmv/routing/mmv.routing.ThumbnailRoute.js', - 'mmv/routing/mmv.routing.MainFileRoute.js', - 'mmv/routing/mmv.routing.Router.js', - ), + 'scripts' => array( + 'mmv/routing/mmv.routing.js', + 'mmv/routing/mmv.routing.Route.js', + 'mmv/routing/mmv.routing.ThumbnailRoute.js', + 'mmv/routing/mmv.routing.MainFileRoute.js', + 'mmv/routing/mmv.routing.Router.js', + ), - 'dependencies' => array( - 'mediawiki.Title', - 'oojs', - ), + 'dependencies' => array( + 'mediawiki.Title', + 'oojs', + ), ), 'mmv.base' => $wgMediaViewerResourceTemplate + array( 'scripts' => array( 'mmv/mmv.base.js', ), + + 'dependencies' => array( + 'jquery.client', + ), ), 'mmv.ui' => $wgMediaViewerResourceTemplate + array( diff --git a/resources/mmv/mmv.base.js b/resources/mmv/mmv.base.js index ff5c1e2c6..f9154d848 100644 --- a/resources/mmv/mmv.base.js +++ b/resources/mmv/mmv.base.js @@ -21,7 +21,8 @@ // We have to disable support for IE < 9 until this is fixed: https://bugzilla.wikimedia.org/show_bug.cgi?id=63303 // This can't be done with feature detection, as the error IE triggers in that situation can't be caught isBrowserSupported : function () { - return ! ( $.browser.msie && parseFloat( $.browser.version ) < 9 ); + var profile = $.client.profile(); + return ! ( profile.name === 'msie' && profile.versionNumber < 9 ); } }; }( mediaWiki, jQuery ) );