r89997 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89996‎ | r89997 | r89998 >
Date:19:05, 13 June 2011
Author:neilk
Status:ok
Tags:
Comment:
in the event that messages.get() received an undefined value, it returns the entire message list(svn diff resources/mediawiki.language.parser.js) so guard against that
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mediawiki.language.parser.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mediawiki.language.parser.js
@@ -124,7 +124,7 @@
125125 getAst: function( key ) {
126126 if ( typeof this.astCache[ key ] === 'undefined' ) {
127127 var wikiText = this.settings.messages.get( key );
128 - if ( wikiText === null ) {
 128+ if ( typeof wikiText !== 'string' ) {
129129 wikiText = "\\[" + key + "\\]";
130130 }
131131 this.astCache[ key ] = this.wikiTextToAst( wikiText );

Status & tagging log