r60767 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60766‎ | r60767 | r60768 >
Date:05:00, 7 January 2010
Author:mah
Status:ok
Tags:
Comment:
follow-up r60763 and r58275. Parser tests now pass.
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialFewestrevisions.php (modified) (history)
  • /trunk/phase3/languages/LanguageConverter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -331,7 +331,11 @@
332332 $text = $this->internalParse( $text );
333333 // internalParse took care of the notitleconvert bit, so title conversion is here.
334334 if ( $this->mDoTitleConvert && !$this->mTitle->isConversionTable()) {
335 - $this->setTitle( Title::newFromText( $wgContLang->convert( $title ) ) );
 335+ $converted = $wgContLang->convert( $title );
 336+ if ( !$converted instanceOf Title ) {
 337+ $converted = Title::newFromText( $converted );
 338+ }
 339+ $this->setTitle( $converted );
336340 }
337341
338342 $text = $this->mStripState->unstripGeneral( $text );
Index: trunk/phase3/includes/specials/SpecialFewestrevisions.php
@@ -56,7 +56,7 @@
5757 if( !$nt ) {
5858 return '<!-- bad title -->';
5959 }
60 -
 60+
6161 $text = $wgContLang->convert( $nt->getPrefixedText() );
6262
6363 $plink = $skin->linkKnown(
Index: trunk/phase3/languages/LanguageConverter.php
@@ -514,13 +514,7 @@
515515 $marked = explode( $this->mMarkup['begin'], $text, 2 );
516516 $converted = '';
517517
518 - if ( $this->mDoContentConvert ) {
519 - // Bug 19620: should convert a string immediately after a
520 - // new rule added.
521 - $converted .= $this->autoConvert( $marked[0], $plang );
522 - } else {
523 - $converted .= $marked[0];
524 - }
 518+ $converted .= $this->autoConvert( $marked[0], $plang );
525519
526520 if ( array_key_exists( 1, $marked ) ) {
527521 $crule = new ConverterRule( $marked[1], $this );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r58275(bug 20884) Try to fix the magic word __NOTC__ which use to prevent title-con...philip19:09, 28 October 2009
r60763Refactor LanguageConversion so that title conversion isn't so flimsy. Pull Ma...mah04:13, 7 January 2010

Status & tagging log