Fixed key name typo
[lhc/web/wiklou.git] / includes / OutputPage.php
index 5ffb802..a0d7e30 100644 (file)
@@ -256,15 +256,10 @@ class OutputPage extends ContextSource {
        private $mTarget = null;
 
        /**
-        * @var bool: Whether parser output should contain table of contents
+        * @var bool: Whether output should contain table of contents
         */
        private $mEnableTOC = true;
 
-       /**
-        * @var bool: Whether parser output should contain section edit links
-        */
-       private $mEnableSectionEditLinks = true;
-
        /**
         * Constructor for OutputPage. This should not be called directly.
         * Instead a new RequestContext should be created and it will implicitly create
@@ -452,8 +447,8 @@ class OutputPage extends ContextSource {
                        if ( $module instanceof ResourceLoaderModule
                                && $module->getOrigin() <= $this->getAllowedModules( $type )
                                && ( is_null( $position ) || $module->getPosition() == $position )
-                               && ( !$this->mTarget || in_array( $this->mTarget, $module->getTargets() ) ) )
-                       {
+                               && ( !$this->mTarget || in_array( $this->mTarget, $module->getTargets() ) )
+                       {
                                $filteredModules[] = $val;
                        }
                }
@@ -896,7 +891,10 @@ class OutputPage extends ContextSource {
                $this->mPagetitle = $nameWithTags;
 
                # change "<i>foo&amp;bar</i>" to "foo&bar"
-               $this->setHTMLTitle( $this->msg( 'pagetitle' )->rawParams( Sanitizer::stripAllTags( $nameWithTags ) ) );
+               $this->setHTMLTitle(
+                       $this->msg( 'pagetitle' )->rawParams( Sanitizer::stripAllTags( $nameWithTags ) )
+                               ->inContentLanguage()
+               );
        }
 
        /**
@@ -1617,7 +1615,6 @@ class OutputPage extends ContextSource {
        function addParserOutput( &$parserOutput ) {
                $this->addParserOutputNoText( $parserOutput );
                $parserOutput->setTOCEnabled( $this->mEnableTOC );
-               $parserOutput->setEditSectionTokens( $this->mEnableSectionEditLinks );
                $text = $parserOutput->getText();
                wfRunHooks( 'OutputPageBeforeHTML', array( &$this, &$text ) );
                $this->addHTML( $text );
@@ -1629,10 +1626,7 @@ class OutputPage extends ContextSource {
         * @param $template QuickTemplate
         */
        public function addTemplate( &$template ) {
-               ob_start();
-               $template->execute();
-               $this->addHTML( ob_get_contents() );
-               ob_end_clean();
+               $this->addHTML( $template->getHTML() );
        }
 
        /**
@@ -2497,7 +2491,7 @@ $templates
                $ret = Html::htmlHeader( array( 'lang' => $this->getLanguage()->getHtmlCode(), 'dir' => $userdir, 'class' => 'client-nojs' ) );
 
                if ( $this->getHTMLTitle() == '' ) {
-                       $this->setHTMLTitle( $this->msg( 'pagetitle', $this->getPageTitle() ) );
+                       $this->setHTMLTitle( $this->msg( 'pagetitle', $this->getPageTitle() )->inContentLanguage() );
                }
 
                $openHead = Html::openElement( 'head' );
@@ -3681,21 +3675,4 @@ $templates
        public function isTOCEnabled() {
                return $this->mEnableTOC;
        }
-
-       /**
-        * Enables/disables section edit links, doesn't override __NOEDITSECTION__
-        * @param bool $flag
-        * @since 1.23
-        */
-       public function enableSectionEditLinks( $flag = true ) {
-               $this->mEnableSectionEditLinks = $flag;
-       }
-
-       /**
-        * @return bool
-        * @since 1.23
-        */
-       public function sectionEditLinksEnabled() {
-               return $this->mEnableSectionEditLinks;
-       }
 }