r3467 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r3466‎ | r3467 | r3468 >
Date:10:23, 3 May 2004
Author:gabrielwicke
Status:old
Tags:
Comment:
switch off message expansion. Messages seem to be expanded in the db, didn't find a reason for this in InitializeMessages.inc. If manually changed to {{ns:4}} and similar this turns up correctly in the php version now.
Modified paths:
  • /trunk/phase3/includes/SpecialAllmessages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialAllmessages.php
@@ -2,7 +2,7 @@
33
44 function wfSpecialAllmessages()
55 {
6 - global $wgOut, $wgAllMessagesEn, $wgRequest;
 6+ global $wgOut, $wgAllMessagesEn, $wgRequest, $wgMessageCache;
77 $ot = $wgRequest->getText('ot');
88 $mwMsg =& MagicWord::get( MAG_MSG );
99 set_time_limit(0);
@@ -12,10 +12,12 @@
1313 $sortedArray = $wgAllMessagesEn;
1414 ksort( $sortedArray );
1515 $messages = array();
 16+ $wgMessageCache->disableTransform();
1617 foreach ( $sortedArray as $key => $enMsg ) {
17 -
1818 $messages[$key]['enmsg'] = $enMsg;
19 - $messages[$key]['statmsg'] = wfMsgNoDB( $key );
 19+ $wgMessageCache->disable();
 20+ $messages[$key]['statmsg'] = wfMsg( $key );
 21+ $wgMessageCache->enable();
2022 $messages[$key]['msg'] = wfMsg ( $key );
2123 }
2224 if ($ot == 'php') {
@@ -39,7 +41,7 @@
4042 } else {
4143 $comment = '';
4244 }
43 - $txt .= " '".$key."' => \"".str_replace('"','\"',$m['msg'])."\",$comment\n";
 45+ $txt .= "'".$key."' => \"".str_replace('"','\"',$m['msg'])."\",$comment\n";
4446 }
4547 $txt .= ');';
4648 return $txt;

Status & tagging log