merged master
[lhc/web/wiklou.git] / includes / Article.php
index 555849c..93e1dbf 100644 (file)
@@ -1722,8 +1722,11 @@ class Article extends Page {
        public function getParserOutput( $oldid = null, User $user = null ) {
                //XXX: bypasses mParserOptions and thus setParserOptions()
 
-               $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 );
        }
@@ -1749,7 +1752,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;