r90602 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90601‎ | r90602 | r90603 >
Date:20:40, 22 June 2011
Author:hartman
Status:ok (Comments)
Tags:
Comment:
Fix global var leaks in jquery.tablersorter.js
Modified paths:
  • /trunk/phase3/resources/jquery/jquery.tablesorter.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/jquery.tablesorter.js
@@ -101,7 +101,7 @@
102102 l = cells.length;
103103
104104 for ( var i = 0; i < l; i++ ) {
105 - p = false;
 105+ var p = false;
106106 sortType = $headers.eq(i).data('sort-type');
107107 if ( typeof sortType != 'undefined' ) {
108108 p = getParserById( sortType );
@@ -264,7 +264,7 @@
265265 // }
266266 //var header_index = computeTableHeaderCellIndexes( table );
267267 var realCellIndex = 0;
268 - $tableHeaders = $( "thead:eq(0) tr", table );
 268+ var $tableHeaders = $( "thead:eq(0) tr", table );
269269 if ( $tableHeaders.length > 1 ) {
270270 $tableHeaders.each(function() {
271271 if (this.cells.length > maxSeen) {
@@ -795,7 +795,7 @@
796796 format: function ( s, table ) {
797797 s = $.trim( s.toLowerCase() );
798798
799 - for ( i = 1, j = 0; i < 13 && j < 2; i++ ) {
 799+ for ( var i = 1, j = 0; i < 13 && j < 2; i++ ) {
800800 s = s.replace( ts.monthNames[j][i], i );
801801 if ( i == 12 ) {
802802 j++;
@@ -859,4 +859,4 @@
860860 type: "numeric"
861861 } );
862862
863 -} )( jQuery );
\ No newline at end of file
 863+} )( jQuery );

Follow-up revisions

RevisionCommit summaryAuthorDate
r91782MFT to REL_1_18: jquery tablesorter...hashar08:54, 9 July 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   00:15, 23 June 2011

Marking for 1.18 merge.

Status & tagging log