r77466 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77465‎ | r77466 | r77467 >
Date:10:29, 30 November 2010
Author:catrope
Status:deferred
Tags:
Comment:
UploadWizard: Account for the fact that mediaWiki.msg might not exist (in pre-RL environments)
Modified paths:
  • /trunk/extensions/UploadWizard/resources/combined.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/combined.min.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/language/mw.Language.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/language/mw.Language.js
@@ -52,7 +52,7 @@
5353 mw.getMsg = function( messageKey , args ) {
5454
5555 // Check for missing message key
56 - if ( ! messageCache[ messageKey ] ) {
 56+ if ( ! messageCache[ messageKey ] && 'msg' in mediaWiki ) {
5757 // Try the ResourceLoader's message store
5858 // FIXME: The two message stores should be unified in the future
5959 var rlMsg = mediaWiki.msg( messageKey );
Index: trunk/extensions/UploadWizard/resources/combined.js
@@ -7478,7 +7478,7 @@
74797479 mw.getMsg = function( messageKey , args ) {
74807480
74817481 // Check for missing message key
7482 - if ( ! messageCache[ messageKey ] ) {
 7482+ if ( ! messageCache[ messageKey ] && 'msg' in mediaWiki ) {
74837483 // Try the ResourceLoader's message store
74847484 // FIXME: The two message stores should be unified in the future
74857485 var rlMsg = mediaWiki.msg( messageKey );
Index: trunk/extensions/UploadWizard/resources/combined.min.js
@@ -7478,7 +7478,7 @@
74797479 mw.getMsg=function(messageKey,args){
74807480
74817481
7482 -if(!messageCache[messageKey]){
 7482+if(!messageCache[messageKey]&&'msg'in mediaWiki){
74837483
74847484
74857485 var rlMsg=mediaWiki.msg(messageKey);

Follow-up revisions

RevisionCommit summaryAuthorDate
r774671.16wmf4: MFT r77466catrope10:30, 30 November 2010
r77469Fix r77466 for nonexistent messagescatrope11:03, 30 November 2010

Status & tagging log