Index: branches/wmf/1.16wmf4/includes/Article.php |
— | — | @@ -815,6 +815,7 @@ |
816 | 816 | # Keep going until $outputDone is set, or we run out of things to do. |
817 | 817 | $pass = 0; |
818 | 818 | $outputDone = false; |
| 819 | + $this->mParserOutput = false; |
819 | 820 | while ( !$outputDone && ++$pass ) { |
820 | 821 | switch( $pass ) { |
821 | 822 | case 1: |
— | — | @@ -923,6 +924,14 @@ |
924 | 925 | } |
925 | 926 | } |
926 | 927 | |
| 928 | + # Adjust the title if it was set by displaytitle, -{T|}- or language conversion |
| 929 | + if ( $this->mParserOutput ) { |
| 930 | + $titleText = $this->mParserOutput->getTitleText(); |
| 931 | + if ( strval( $titleText ) !== '' ) { |
| 932 | + $wgOut->setPageTitle( $titleText ); |
| 933 | + } |
| 934 | + } |
| 935 | + |
927 | 936 | # Now that we've filled $this->mParserOutput, we know whether |
928 | 937 | # there are any __NOINDEX__ tags on the page |
929 | 938 | $policy = $this->getRobotPolicy( 'view' ); |
Index: branches/wmf/1.16wmf4/includes/parser/Parser.php |
— | — | @@ -305,7 +305,7 @@ |
306 | 306 | * to internalParse() which does all the real work. |
307 | 307 | */ |
308 | 308 | |
309 | | - global $wgUseTidy, $wgAlwaysUseTidy, $wgContLang, $wgDisableLangConversion, $wgUser, $wgRequest, $wgDisableTitleConversion; |
| 309 | + global $wgUseTidy, $wgAlwaysUseTidy, $wgContLang, $wgDisableLangConversion, $wgDisableTitleConversion; |
310 | 310 | $fname = __METHOD__.'-' . wfGetCaller(); |
311 | 311 | wfProfileIn( __METHOD__ ); |
312 | 312 | wfProfileIn( $fname ); |
— | — | @@ -379,16 +379,16 @@ |
380 | 380 | */ |
381 | 381 | if ( !( $wgDisableLangConversion |
382 | 382 | || $wgDisableTitleConversion |
383 | | - || $wgRequest->getText( 'redirect', 'yes' ) == 'no' |
384 | | - || $wgRequest->getText( 'linkconvert', 'yes' ) == 'no' |
385 | 383 | || isset( $this->mDoubleUnderscores['nocontentconvert'] ) |
386 | 384 | || isset( $this->mDoubleUnderscores['notitleconvert'] ) |
387 | | - || $wgUser->getOption( 'noconvertlink' ) == 1 ) ) { |
| 385 | + || $this->mOutput->getDisplayTitle() !== false ) ) |
| 386 | + { |
388 | 387 | $convruletitle = $wgContLang->getConvRuleTitle(); |
389 | 388 | if ( $convruletitle ) { |
390 | 389 | $this->mOutput->setTitleText( $convruletitle ); |
391 | 390 | } else { |
392 | | - $this->mOutput->setTitleText( $wgContLang->convert( $this->mOutput->getTitleText() ) ); |
| 391 | + $titleText = $wgContLang->convertTitle( $title ); |
| 392 | + $this->mOutput->setTitleText( $titleText ); |
393 | 393 | } |
394 | 394 | } |
395 | 395 | |
Index: branches/wmf/1.16wmf4/includes/OutputPage.php |
— | — | @@ -435,7 +435,8 @@ |
436 | 436 | } |
437 | 437 | |
438 | 438 | /** |
439 | | - * "HTML title" means the contents of <title>. It is stored as plain, unescaped text and will be run through htmlspecialchars in the skin file. |
| 439 | + * "HTML title" means the contents of <title>. |
| 440 | + * It is stored as plain, unescaped text and will be run through htmlspecialchars in the skin file. |
440 | 441 | */ |
441 | 442 | public function setHTMLTitle( $name ) { |
442 | 443 | $this->mHTMLtitle = $name; |
— | — | @@ -1085,11 +1086,6 @@ |
1086 | 1087 | $this->mTemplateIds[$ns] = $dbks; |
1087 | 1088 | } |
1088 | 1089 | } |
1089 | | - // Page title |
1090 | | - $title = $parserOutput->getTitleText(); |
1091 | | - if ( $title != '' ) { |
1092 | | - $this->setPageTitle( $title ); |
1093 | | - } |
1094 | 1090 | |
1095 | 1091 | // Hooks registered in the object |
1096 | 1092 | global $wgParserOutputHooks; |
Property changes on: branches/wmf/1.16wmf4/includes/OutputPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1097 | 1093 | Merged /trunk/phase3/includes/OutputPage.php:r64851,64856,64876,64892,64918 |