r45304 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r45303
|
r45304
|
r45305
>
Date:
00:11, 2 January 2009
Author:
simetrical
Status:
ok
Tags:
Comment:
Don't use for (i in array) in JavaScript
This reportedly can cause errors, because it will return all object
attributes, not just array elements. Use a C-style for here instead.
This could be done in other places too -- the immediate motive here is
that this might be related:
http://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Sortable_tables_.26_Firefox_3.0.5
The functionality seems to still work.
Modified paths:
/trunk/phase3/skins/common/wikibits.js
(modified) (
history
)
Diff
[
purge
]
Index: trunk/phase3/skins/common/wikibits.js
—
—
@@ -661,7 +661,7 @@
662
662
span.setAttribute('sortdir','down');
663
663
}
664
664
665
- for(var i in staticRows) {
665
+ for (var i = 0; i < staticRows.length; i++) {
666
666
var row = staticRows[i];
667
667
newRows.splice(row[2], 0, row);
668
668
}
Follow-up revisions
Revision
Commit summary
Author
Date
r45307
Increment $wgStyleVersion for
r45304
.
tstarling
05:29, 2 January 2009
Status & tagging log
10:16, 2 January 2009
Aaron Schulz
(
talk
|
contribs
)
changed the
status
of r45304
[
removed:
new
added:
ok]