Made OutputPage::tryParserCache() use addParserOutputNoText(), this fixes {{DISPLAYTI...
authorTim Starling <tstarling@users.mediawiki.org>
Mon, 24 Jul 2006 05:25:12 +0000 (05:25 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Mon, 24 Jul 2006 05:25:12 +0000 (05:25 +0000)
includes/OutputPage.php
includes/Parser.php

index 78374ca..7506806 100644 (file)
@@ -308,6 +308,8 @@ class OutputPage {
                }
                if ( $parserOutput->mHTMLtitle != "" ) {
                        $this->mPagetitle = $parserOutput->mHTMLtitle ;
+               }
+               if ( $parserOutput->mSubtitle != '' ) {
                        $this->mSubtitle .= $parserOutput->mSubtitle ;
                }
        }
@@ -385,18 +387,10 @@ class OutputPage {
                $parserCache =& ParserCache::singleton();
                $parserOutput = $parserCache->get( $article, $user );
                if ( $parserOutput !== false ) {
-                       $this->mLanguageLinks += $parserOutput->getLanguageLinks();
-                       $this->addCategoryLinks( $parserOutput->getCategories() );
-                       $this->addKeywords( $parserOutput );
-                       $this->mNewSectionLink = $parserOutput->getNewSection();
-                       $this->mNoGallery = $parserOutput->getNoGallery();
+                       $this->addParserOutputNoText( $parserOutput );
                        $text = $parserOutput->getText();
                        wfRunHooks( 'OutputPageBeforeHTML', array( &$this, &$text ) );
                        $this->addHTML( $text );
-                       $t = $parserOutput->getTitleText();
-                       if( !empty( $t ) ) {
-                               $this->setPageTitle( $t );
-                       }
                        return true;
                } else {
                        return false;
index 1079f5b..6619643 100644 (file)
@@ -4427,6 +4427,7 @@ class ParserOutput
        function &getImages()                { return $this->mImages; }
        function &getExternalLinks()         { return $this->mExternalLinks; }
        function getNoGallery()              { return $this->mNoGallery; }
+       function getSubtitle()               { return $this->mSubtitle; }
 
        function containsOldMagic()          { return $this->mContainsOldMagic; }
        function setText( $text )            { return wfSetVar( $this->mText, $text ); }
@@ -4434,7 +4435,8 @@ class ParserOutput
        function setCategoryLinks( $cl )     { return wfSetVar( $this->mCategories, $cl ); }
        function setContainsOldMagic( $com ) { return wfSetVar( $this->mContainsOldMagic, $com ); }
        function setCacheTime( $t )          { return wfSetVar( $this->mCacheTime, $t ); }
-       function setTitleText( $t )          { return wfSetVar ($this->mTitleText, $t); }
+       function setTitleText( $t )          { return wfSetVar($this->mTitleText, $t); }
+       function setSubtitle( $st )          { return wfSetVar( $this->mSubtitle, $st ); }
 
        function addCategory( $c, $sort )    { $this->mCategories[$c] = $sort; }
        function addImage( $name )           { $this->mImages[$name] = 1; }