r81146 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81145‎ | r81146 | r81147 >
Date:18:33, 28 January 2011
Author:catrope
Status:ok (Comments)
Tags:
Comment:
Random fixes in mediawiki.js: add a var, fix indentation, and get our ABC right
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -307,7 +307,7 @@
308308 */
309309 function generateId() {
310310 var id = '';
311 - var seed = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
 311+ var seed = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
312312 for ( var i = 0, r; i < 32; i++ ) {
313313 r = Math.floor( Math.random() * seed.length );
314314 id += seed.substring( r, r + 1 );
@@ -1137,7 +1137,7 @@
11381138 */
11391139 this.element = function( name, attrs, contents ) {
11401140 var s = '<' + name;
1141 - for ( attrName in attrs ) {
 1141+ for ( var attrName in attrs ) {
11421142 s += ' ' + attrName + '="' + this.escape( attrs[attrName] ) + '"';
11431143 }
11441144 if ( typeof contents == 'undefined' || contents === null ) {
@@ -1147,7 +1147,7 @@
11481148 }
11491149 // Regular open tag
11501150 s += '>';
1151 - if (typeof contents === 'string') {
 1151+ if ( typeof contents === 'string') {
11521152 // Escaped
11531153 s += this.escape( contents );
11541154 } else if ( contents instanceof this.Raw ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r814021.17: MFT r79915, r79957, r79964, r79990, r80687, r80999, r81006, r81011, r81...catrope16:18, 2 February 2011

Comments

#Comment by Krinkle (talk | contribs)   19:28, 28 January 2011

The headings are overwritten and the first one is removed. (arrays start at 0, first count is 1, +1 difference)

#Comment by Krinkle (talk | contribs)   19:28, 28 January 2011

Weird, my comment is appearing on the wrong bug again...

#Comment by Hashar (talk | contribs)   14:45, 29 January 2011

'ok' + 1.17

Status & tagging log