From: Krinkle Date: Wed, 3 Aug 2011 11:59:11 +0000 (+0000) Subject: Fix noglobals exceptions from QUnit X-Git-Tag: 1.31.0-rc.0~28464 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=4e133f4e2eb3f0ca70e3a6bcb4ae9b1f21b2ca6e;p=lhc%2Fweb%2Fwiklou.git Fix noglobals exceptions from QUnit * Test results prior to this commit: http://i.imgur.com/m8rbk.png * http://localhost/trunkw/tests/qunit/?noglobals=1 - Missing var-statement, causes global scope implication - Missing semi colon, causing next to be global --- diff --git a/resources/jquery/jquery.textSelection.js b/resources/jquery/jquery.textSelection.js index b16e755663..5b3c833c76 100644 --- a/resources/jquery/jquery.textSelection.js +++ b/resources/jquery/jquery.textSelection.js @@ -454,7 +454,7 @@ scrollToCaretPosition: function( options ) { context.fn.restoreSelection(); needSave = true; } - retval = ( hasIframe ? context.fn : fn )[command].call( this, options ); + var retval = ( hasIframe ? context.fn : fn )[command].call( this, options ); if ( hasIframe && needSave ) { context.fn.saveSelection(); } diff --git a/resources/mediawiki/mediawiki.Title.js b/resources/mediawiki/mediawiki.Title.js index 96292d2241..985c5c9205 100644 --- a/resources/mediawiki/mediawiki.Title.js +++ b/resources/mediawiki/mediawiki.Title.js @@ -120,7 +120,7 @@ var Title = function( title, namespace ) { * @return {mw.Title} */ setAll = function( title, s ) { - var matches = s.match( /^(?:([^:]+):)?(.*?)(?:\.(\w{1,5}))?$/ ); + var matches = s.match( /^(?:([^:]+):)?(.*?)(?:\.(\w{1,5}))?$/ ), ns_match = getNsIdByName( matches[1] ); if ( matches.length && ns_match ) { if ( matches[1] ) { title._ns = ns_match; }