From: Trevor Parscal Date: Fri, 1 Oct 2010 21:50:32 +0000 (+0000) Subject: Fixed bug that caused version numbers to be output incorectly. JavaScript's Array... X-Git-Tag: 1.31.0-rc.0~34696 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=d7743a79e332090d747f1530154222d988aa7542;p=lhc%2Fweb%2Fwiklou.git Fixed bug that caused version numbers to be output incorectly. JavaScript's Array.prototype.join() uses "," as a default value, not "". --- diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js index 465e147775..0c4422accb 100644 --- a/resources/mediawiki/mediawiki.js +++ b/resources/mediawiki/mediawiki.js @@ -233,14 +233,14 @@ window.mediaWiki = new ( function( $ ) { */ function formatVersionNumber( timestamp ) { function pad( a, b, c ) { - return [a < 10 ? '0' + a : a, b < 10 ? '0' + b : b, c < 10 ? '0' + c : c].join(); + return [a < 10 ? '0' + a : a, b < 10 ? '0' + b : b, c < 10 ? '0' + c : c].join( '' ); } var d = new Date() d.setTime( timestamp * 1000 ); return [ pad( d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate() ), 'T', pad( d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds() ), 'Z' - ].join(); + ].join( '' ); } /**