Remove unused variable $user from SkinTemplate::outputPage()
[lhc/web/wiklou.git] / includes / OutputPage.php
index 638887b..eac70a3 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;
                        }
                }
@@ -692,10 +687,6 @@ class OutputPage extends ContextSource {
                        wfDebug( __METHOD__ . ": CACHE DISABLED\n", false );
                        return false;
                }
-               if ( $this->getUser()->getOption( 'nocache' ) ) {
-                       wfDebug( __METHOD__ . ": USER DISABLED CACHE\n", false );
-                       return false;
-               }
 
                $timestamp = wfTimestamp( TS_MW, $timestamp );
                $modifiedTimes = array(
@@ -896,7 +887,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 +1611,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 );
@@ -2494,7 +2487,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' );
@@ -3678,21 +3671,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;
-       }
 }