Index: branches/MwEmbedStandAlone/modules/AddMedia/searchLibs/mediaWikiSearch.js |
— | — | @@ -94,7 +94,7 @@ |
95 | 95 | var pound = ''; |
96 | 96 | // loop over the data and group by title |
97 | 97 | if ( data.query && data.query.recentchanges ) { |
98 | | - for ( var i in data.query.recentchanges ) { |
| 98 | + for ( var i=0; i < data.query.recentchanges.length; i++ ) { |
99 | 99 | var rc = data.query.recentchanges[i]; |
100 | 100 | if ( !titleSet[ rc.title ] ) { |
101 | 101 | titleSet[ rc.title ] = true; |
— | — | @@ -231,7 +231,7 @@ |
232 | 232 | } |
233 | 233 | }; |
234 | 234 | |
235 | | - for( var i in page.imageinfo[0].metadata ){ |
| 235 | + for( var i=0; i < page.imageinfo[0].metadata.length; i++ ){ |
236 | 236 | if( page.imageinfo[0].metadata[i].name == 'length' ){ |
237 | 237 | resource.duration = page.imageinfo[0].metadata[i].value; |
238 | 238 | } |
— | — | @@ -421,4 +421,4 @@ |
422 | 422 | '|Description =' + resource.inlineDesc + "\n" + |
423 | 423 | '}}'; |
424 | 424 | } |
425 | | -} |
\ No newline at end of file |
| 425 | +} |