Index: branches/uploadwizard/extensions/UploadWizard/resources/language/mw.Parser.js |
— | — | @@ -19,8 +19,8 @@ |
20 | 20 | * @param {Object} magicSet key:callback |
21 | 21 | */ |
22 | 22 | mw.addTemplateTransform = function( magicSet ) { |
23 | | - for ( var i in magicSet ) { |
24 | | - pMagicSet[ i ] = magicSet[i]; |
| 23 | + for ( var name in magicSet ) { |
| 24 | + pMagicSet[name] = magicSet[name]; |
25 | 25 | } |
26 | 26 | }; |
27 | 27 | |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | paramSet.splice( 0, 1 ); |
113 | 113 | if ( paramSet.length ) { |
114 | 114 | templateObject.param = new Array(); |
115 | | - for ( var pInx in paramSet ) { |
| 115 | + for ( var pInx = 0; pInx < paramSet.length; pInx++ ) { |
116 | 116 | var paramString = paramSet[ pInx ]; |
117 | 117 | // check for empty param |
118 | 118 | if ( paramString == '' ) { |
— | — | @@ -206,7 +206,7 @@ |
207 | 207 | |
208 | 208 | if ( node['child'] ) { |
209 | 209 | // swap all the kids: |
210 | | - for ( var i in node['child'] ) { |
| 210 | + for ( var i = 0; i < node['child'].length; i++ ) { |
211 | 211 | var nodeText = recurse_magic_swap( node['child'][i] ); |
212 | 212 | // swap it into current |
213 | 213 | if ( node.text ) { |
— | — | @@ -249,7 +249,7 @@ |
250 | 250 | var tmplSet = new Array(); |
251 | 251 | function getMatchingTmpl( node ) { |
252 | 252 | if ( node['child'] ) { |
253 | | - for ( var i in node['child'] ) { |
| 253 | + for ( var i = 0; i < node['child'].length; i++ ) { |
254 | 254 | getMatchingTmpl( node['child'] ); |
255 | 255 | } |
256 | 256 | } |
— | — | @@ -320,4 +320,4 @@ |
321 | 321 | } |
322 | 322 | }; |
323 | 323 | |
324 | | -}) ( window.mw ); |
\ No newline at end of file |
| 324 | +}) ( window.mw ); |