Merge "(bug 40098) Don't parse the section's name in the summary when creating a...
[lhc/web/wiklou.git] / includes / Article.php
index a3fb747..9ab4b6b 100644 (file)
@@ -1243,7 +1243,7 @@ class Article extends Page {
 
                if ( $appendSubtitle ) {
                        $out = $this->getContext()->getOutput();
-                       $out->appendSubtitle( wfMessage( 'redirectpagesub' )->escaped() );
+                       $out->addSubtitle( wfMessage( 'redirectpagesub' )->escaped() );
                }
 
                // the loop prepends the arrow image before the link, so the first case needs to be outside
@@ -1617,8 +1617,11 @@ class Article extends Page {
         * @return ParserOutput or false if the given revsion ID is not found
         */
        public function getParserOutput( $oldid = null, User $user = null ) {
-               $user = is_null( $user ) ? $this->getContext()->getUser() : $user;
-               $parserOptions = $this->mPage->makeParserOptions( $user );
+               if ( $user === null ) {
+                       $parserOptions = $this->getParserOptions();
+               } else {
+                       $parserOptions = $this->mPage->makeParserOptions( $user );
+               }
 
                return $this->mPage->getParserOutput( $parserOptions, $oldid );
        }
@@ -1629,7 +1632,7 @@ class Article extends Page {
         */
        public function getParserOptions() {
                if ( !$this->mParserOptions ) {
-                       $this->mParserOptions = $this->mPage->makeParserOptions( $this->getContext()->getUser() );
+                       $this->mParserOptions = $this->mPage->makeParserOptions( $this->getContext() );
                }
                // Clone to allow modifications of the return value without affecting cache
                return clone $this->mParserOptions;