r68841 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68840‎ | r68841 | r68842 >
Date:17:53, 1 July 2010
Author:catrope
Status:deferred
Tags:
Comment:
UsabilityInitiative: (bug 24208) "undefinedundefinedundefined" shown in special characters. Caused by a combination of user scripts adding stuff to Array.prototype and a bad for loop
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -69,7 +69,7 @@
7070 array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 36 ),
7171 array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 195 ),
7272 array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 53 ),
73 - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 70 ),
 73+ array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 71 ),
7474 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 28 ),
7575 array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 98 ),
7676 array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 12 ),
@@ -82,10 +82,10 @@
8383 array( 'src' => 'js/thirdparty/contentCollector.js', 'version' => 2 ),
8484 ),
8585 'combined' => array(
86 - array( 'src' => 'js/plugins.combined.js', 'version' => 445 ),
 86+ array( 'src' => 'js/plugins.combined.js', 'version' => 446 ),
8787 ),
8888 'minified' => array(
89 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 455 ),
 89+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 456 ),
9090 ),
9191 ),
9292 );
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js
@@ -497,8 +497,8 @@
498498 }
499499 if ( 'characters' in page ) {
500500 var html = '';
501 - for ( character in page.characters ) {
502 - html += $.wikiEditor.modules.toolbar.fn.buildCharacter( page.characters[character], actions );
 501+ for ( var i = 0; i < page.characters.length; i++ ) {
 502+ html += $.wikiEditor.modules.toolbar.fn.buildCharacter( page.characters[i], actions );
503503 }
504504 $characters
505505 .html( html )
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -6671,8 +6671,8 @@
66726672 }
66736673 if ( 'characters' in page ) {
66746674 var html = '';
6675 - for ( character in page.characters ) {
6676 - html += $.wikiEditor.modules.toolbar.fn.buildCharacter( page.characters[character], actions );
 6675+ for ( var i = 0; i < page.characters.length; i++ ) {
 6676+ html += $.wikiEditor.modules.toolbar.fn.buildCharacter( page.characters[i], actions );
66776677 }
66786678 $characters
66796679 .html( html )
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -449,7 +449,7 @@
450450 if('rows'in page){for(row in page.rows){html+=$.wikiEditor.modules.toolbar.fn.buildRow(context,page.rows[row])}}
451451 $page.html(html);break;case'characters':$page.addClass('page-characters');$characters=$('<div />').data('context',context).data('actions',{});var actions=$characters.data('actions');if('language'in page){$characters.attr('lang',page.language);}
452452 if('direction'in page){$characters.attr('dir',page.direction);}
453 -if('characters'in page){var html='';for(character in page.characters){html+=$.wikiEditor.modules.toolbar.fn.buildCharacter(page.characters[character],actions);}
 453+if('characters'in page){var html='';for(var i=0;i<page.characters.length;i++){html+=$.wikiEditor.modules.toolbar.fn.buildCharacter(page.characters[i],actions);}
454454 $characters.html(html).children().mousedown(function(e){context.fn.saveStuffForIE();e.preventDefault();return false;}).click(function(e){$.wikiEditor.modules.toolbar.fn.doAction($(this).parent().data('context'),$(this).parent().data('actions')[$(this).attr('rel')],$(this));e.preventDefault();return false;});}
455455 $page.append($characters);break;}
456456 return $page;},buildHeading:function(context,headings){var html='<tr>';for(heading in headings){html+='<th>'+$.wikiEditor.autoMsg(headings[heading],['html','text'])+'</th>';}

Status & tagging log