r57593 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57592‎ | r57593 | r57594 >
Date:21:21, 9 October 2009
Author:catrope
Status:ok
Tags:
Comment:
EditToolbar: Explicitly pass base 10 to parseInt() because parseInt("010") == 8 but parseInt("010", 10) == 10
Modified paths:
  • /trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js
@@ -1102,8 +1102,8 @@
11031103 'edittoolbar-tool-table-insert': function() {
11041104 var rowsVal = $j( '#edittoolbar-table-dimensions-rows' ).val();
11051105 var colsVal = $j( '#edittoolbar-table-dimensions-columns' ).val();
1106 - var rows = parseInt( rowsVal );
1107 - var cols = parseInt( colsVal );
 1106+ var rows = parseInt( rowsVal, 10 );
 1107+ var cols = parseInt( colsVal, 10 );
11081108 var header = Math.min( 1, $j( '#edittoolbar-table-dimensions-header:checked' ).size() );
11091109 if ( isNaN( rows ) || isNaN( cols ) || rows != rowsVal || cols != colsVal ) {
11101110 alert( gM( 'edittoolbar-tool-table-invalidnumber' ) );
Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.php
@@ -19,7 +19,7 @@
2020 /* Configuration */
2121
2222 // Bump the version number every time you change any of the .css/.js files
23 -$wgEditToolbarStyleVersion = 55;
 23+$wgEditToolbarStyleVersion = 56;
2424
2525 // Set this to true to simply override the stock toolbar for everyone
2626 $wgEditToolbarGlobalEnable = false;

Follow-up revisions

RevisionCommit summaryAuthorDate
r57719wmf-deployment: Merge babaco fixes from trunk...catrope20:20, 14 October 2009

Status & tagging log