r83468 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83467‎ | r83468 | r83469 >
Date:18:27, 7 March 2011
Author:btongminh
Status:ok
Tags:
Comment:
(bug 27753) Fix the fallback to newuser-message-template by inspecting the template size instead of the message
Modified paths:
  • /trunk/extensions/NewUserMessage/NewUserMessage.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/NewUserMessage/NewUserMessage.class.php
@@ -85,11 +85,14 @@
8686 */
8787 static function fetchText() {
8888 $template = wfMsg( 'newusermessage-template-body' );
 89+
 90+ $title = Title::newFromText( $template );
 91+ if ( $title && $title->exists() && $title->getLength() ) {
 92+ return $template;
 93+ }
 94+
8995 // Fall back if necessary to the old template
90 - if ( !$template ) {
91 - $template = wfMsg( 'newusermessage-template' );
92 - }
93 - return $template;
 96+ return wfMsg( 'newusermessage-template' );
9497 }
9598
9699 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r834871.17wmf1: MFT r82696, r83270, r83284, r83374, r83390, r83392, r83402, r83403,...catrope21:44, 7 March 2011
r85033MFT more extension revs: r82601, r82654, r82698, r82755, r82756, r82759, r829...demon18:49, 30 March 2011

Status & tagging log