r56458 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56457‎ | r56458 | r56459 >
Date:23:50, 16 September 2009
Author:werdna
Status:resolved (Comments)
Tags:
Comment:
Partial revert of r55415, calling wfMsg in Language object constructor causes unstub loops
Modified paths:
  • /trunk/phase3/languages/classes/LanguageZh.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/classes/LanguageZh.php
@@ -135,14 +135,6 @@
136136 $variants_all = array('zh','zh-hans','zh-hant','zh-cn','zh-hk','zh-mo','zh-my','zh-sg','zh-tw');
137137 $variants = array();
138138
139 - // If a wiki disabled some variants,
140 - // LanguageConverter shouldn't process them
141 - foreach( $variants_all as $variant ) {
142 - $status = wfMsgExt( "variantname-$variant", array( 'parsemag', 'language' => $this ) );
143 - if( trim($status) != 'disable' )
144 - $variants[] = $variant;
145 - }
146 -
147139 $variantfallbacks = array(
148140 'zh' => array('zh-hans','zh-hant','zh-cn','zh-tw','zh-hk','zh-sg','zh-mo','zh-my'),
149141 'zh-hans' => array('zh-cn','zh-sg','zh-my'),

Follow-up revisions

RevisionCommit summaryAuthorDate
r56460Merge r56458, r56459 from trunk -- fix unstub loops in zhbrion23:55, 16 September 2009
r56560Follow up on r55415 and r56458. Use another way to disable variants. Server a...philip19:51, 17 September 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r554151. Revert my revision r55371. Since it may override logged user's settings....philip16:00, 21 August 2009

Comments

#Comment by PhiLiP (talk | contribs)   01:35, 17 September 2009

LanguageZh has constructed its parent object *before* the wfMsg was called. So I don't think the wfMsg called in LanguageZh object constructor would cause unstub loop. Otherwise, Language object has also provided functions that used wfMsg.

#Comment by PhiLiP (talk | contribs)   01:49, 17 September 2009

Test show it should be my fault. I'll find another way to accomplish this. I'm sorry.

Status & tagging log