r64929 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64928‎ | r64929 | r64930 >
Date:12:01, 11 April 2010
Author:catrope
Status:ok (Comments)
Tags:
Comment:
1.16wmf4: Merge langconverter fixes from trunk: r64851, r64856, r64876, r64892, r64918
Modified paths:
  • /branches/wmf/1.16wmf4/includes/Article.php (modified) (history)
  • /branches/wmf/1.16wmf4/includes/OutputPage.php (modified) (history)
  • /branches/wmf/1.16wmf4/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/includes/Article.php
@@ -815,6 +815,7 @@
816816 # Keep going until $outputDone is set, or we run out of things to do.
817817 $pass = 0;
818818 $outputDone = false;
 819+ $this->mParserOutput = false;
819820 while ( !$outputDone && ++$pass ) {
820821 switch( $pass ) {
821822 case 1:
@@ -923,6 +924,14 @@
924925 }
925926 }
926927
 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+
927936 # Now that we've filled $this->mParserOutput, we know whether
928937 # there are any __NOINDEX__ tags on the page
929938 $policy = $this->getRobotPolicy( 'view' );
Index: branches/wmf/1.16wmf4/includes/parser/Parser.php
@@ -305,7 +305,7 @@
306306 * to internalParse() which does all the real work.
307307 */
308308
309 - global $wgUseTidy, $wgAlwaysUseTidy, $wgContLang, $wgDisableLangConversion, $wgUser, $wgRequest, $wgDisableTitleConversion;
 309+ global $wgUseTidy, $wgAlwaysUseTidy, $wgContLang, $wgDisableLangConversion, $wgDisableTitleConversion;
310310 $fname = __METHOD__.'-' . wfGetCaller();
311311 wfProfileIn( __METHOD__ );
312312 wfProfileIn( $fname );
@@ -379,16 +379,16 @@
380380 */
381381 if ( !( $wgDisableLangConversion
382382 || $wgDisableTitleConversion
383 - || $wgRequest->getText( 'redirect', 'yes' ) == 'no'
384 - || $wgRequest->getText( 'linkconvert', 'yes' ) == 'no'
385383 || isset( $this->mDoubleUnderscores['nocontentconvert'] )
386384 || isset( $this->mDoubleUnderscores['notitleconvert'] )
387 - || $wgUser->getOption( 'noconvertlink' ) == 1 ) ) {
 385+ || $this->mOutput->getDisplayTitle() !== false ) )
 386+ {
388387 $convruletitle = $wgContLang->getConvRuleTitle();
389388 if ( $convruletitle ) {
390389 $this->mOutput->setTitleText( $convruletitle );
391390 } else {
392 - $this->mOutput->setTitleText( $wgContLang->convert( $this->mOutput->getTitleText() ) );
 391+ $titleText = $wgContLang->convertTitle( $title );
 392+ $this->mOutput->setTitleText( $titleText );
393393 }
394394 }
395395
Index: branches/wmf/1.16wmf4/includes/OutputPage.php
@@ -435,7 +435,8 @@
436436 }
437437
438438 /**
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.
440441 */
441442 public function setHTMLTitle( $name ) {
442443 $this->mHTMLtitle = $name;
@@ -1085,11 +1086,6 @@
10861087 $this->mTemplateIds[$ns] = $dbks;
10871088 }
10881089 }
1089 - // Page title
1090 - $title = $parserOutput->getTitleText();
1091 - if ( $title != '' ) {
1092 - $this->setPageTitle( $title );
1093 - }
10941090
10951091 // Hooks registered in the object
10961092 global $wgParserOutputHooks;
Property changes on: branches/wmf/1.16wmf4/includes/OutputPage.php
___________________________________________________________________
Modified: svn:mergeinfo
10971093 Merged /trunk/phase3/includes/OutputPage.php:r64851,64856,64876,64892,64918

Follow-up revisions

RevisionCommit summaryAuthorDate
r64930Followup r64929: forgot to merge languages/ dircatrope12:16, 11 April 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64851Fix bug 23115 again. Follow up r64821, r64823 and r64827. Rewrite the convert...philip05:46, 10 April 2010
r64856Follow up r64851. Remove $wgOut.philip07:07, 10 April 2010
r64876Proposed cleanup of recent LanguageConverter-related commits:...tstarling13:38, 10 April 2010
r64892Follow up r64876 setHTMLTitle with boolean parameter left.platonides18:29, 10 April 2010
r64918Fix for issue noted on CR r64876: fatal error on CSS/JS subpage displaytstarling23:52, 10 April 2010

Comments

#Comment by Tim Starling (talk | contribs)   16:37, 20 April 2010

To apply to REL1_16 it will need r64811, r64815, r64821, r64824, r64830, possibly others.

Status & tagging log