r91526 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91525‎ | r91526 | r91527 >
Date:05:44, 6 July 2011
Author:tstarling
Status:ok
Tags:
Comment:
* MFT r88134: Fixed a bug in transformation where previous language could leak into later transformations in UI language.
* Merged the wfSetVar() boolean parameter addition from r79272 which was needed by the above.
Modified paths:
  • /branches/REL1_17/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_17/phase3/includes/GlobalFunctions.php (modified) (history)
  • /branches/REL1_17/phase3/includes/MessageCache.php (modified) (history)
  • /branches/REL1_17/phase3/includes/parser/ParserOptions.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/phase3/includes/GlobalFunctions.php
@@ -1341,10 +1341,11 @@
13421342 /**
13431343 * Sets dest to source and returns the original value of dest
13441344 * If source is NULL, it just returns the value, it doesn't set the variable
 1345+ * If force is true, it will set the value even if source is NULL
13451346 */
1346 -function wfSetVar( &$dest, $source ) {
 1347+function wfSetVar( &$dest, $source, $force = false ) {
13471348 $temp = $dest;
1348 - if ( !is_null( $source ) ) {
 1349+ if ( !is_null( $source ) || $force ) {
13491350 $dest = $source;
13501351 }
13511352 return $temp;
Index: branches/REL1_17/phase3/includes/parser/ParserOptions.php
@@ -125,7 +125,7 @@
126126 function setTidy( $x ) { return wfSetVar( $this->mTidy, $x); }
127127 function setSkin( $x ) { $this->mSkin = $x; }
128128 function setInterfaceMessage( $x ) { return wfSetVar( $this->mInterfaceMessage, $x); }
129 - function setTargetLanguage( $x ) { return wfSetVar( $this->mTargetLanguage, $x); }
 129+ function setTargetLanguage( $x ) { return wfSetVar( $this->mTargetLanguage, $x, true ); }
130130 function setMaxIncludeSize( $x ) { return wfSetVar( $this->mMaxIncludeSize, $x ); }
131131 function setMaxPPNodeCount( $x ) { return wfSetVar( $this->mMaxPPNodeCount, $x ); }
132132 function setMaxTemplateDepth( $x ) { return wfSetVar( $this->mMaxTemplateDepth, $x ); }
Property changes on: branches/REL1_17/phase3/includes/parser/ParserOptions.php
___________________________________________________________________
Added: svn:mergeinfo
133133 Merged /branches/REL1_15/phase3/includes/parser/ParserOptions.php:r51646
134134 Merged /branches/sqlite/includes/parser/ParserOptions.php:r58211-58321
135135 Merged /trunk/phase3/includes/parser/ParserOptions.php:r82474,82845,82847-82848,85752,88134
136136 Merged /branches/new-installer/phase3/includes/parser/ParserOptions.php:r43664-66004
137137 Merged /branches/wmf-deployment/includes/parser/ParserOptions.php:r53381
Index: branches/REL1_17/phase3/includes/MessageCache.php
@@ -677,8 +677,9 @@
678678 $popts = $this->getParserOptions();
679679 $popts->setInterfaceMessage( $interface );
680680 $popts->setTargetLanguage( $language );
681 - $popts->setUserLang( $language );
 681+ $userlang = $popts->setUserLang( $language );
682682 $message = $this->mParser->transformMsg( $message, $popts );
 683+ $popts->setUserLang( $userlang );
683684 }
684685 return $message;
685686 }
Index: branches/REL1_17/phase3/RELEASE-NOTES
@@ -39,6 +39,8 @@
4040 * (bug 29535) Added missing Creative Commons CC0 icon.
4141 * (bug 29726) Fixed failure to load internationalization messages in
4242 client-side scripts on WebKit-based browsers.
 43+* Fixed a bug in message transformation where the previous language could leak
 44+ into later transformations in the UI language.
4345
4446 === Changes since 1.17.0rc1 ===
4547

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79272-Destroy the DB automatically when initting the DB...soxred9317:30, 30 December 2010
r88134Fixed a bug in transformation where previous language could leak into later t...nikerabbit07:16, 15 May 2011

Status & tagging log