Make parser->getFunctionLang be dependent on title->getPageLanguage() instead of...
authorRobin Pepermans <robin@users.mediawiki.org>
Sun, 26 Jun 2011 22:58:27 +0000 (22:58 +0000)
committerRobin Pepermans <robin@users.mediawiki.org>
Sun, 26 Jun 2011 22:58:27 +0000 (22:58 +0000)
includes/EditPage.php
includes/parser/Parser.php

index 44cba7f..457b2b5 100644 (file)
@@ -2071,11 +2071,6 @@ HTML
 
                                wfRunHooks( 'EditPageGetPreviewText', array( $this, &$toparse ) );
 
-                               // In which language to parse the page
-                               // (Should this still be only for MediaWiki pages, or for all pages?)
-                               if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
-                                       $parserOptions->setTargetLanguage( $this->mTitle->getPageLanguage() );
-                               }
                                $parserOptions->setTidy( true );
                                $parserOptions->enableLimitReport();
                                $parserOutput = $wgParser->parse( $this->mArticle->preSaveTransform( $toparse ),
index 26c54af..76974c9 100644 (file)
@@ -673,7 +673,7 @@ class Parser {
                if ( $target !== null ) {
                        return $target;
                } else {
-                       return $this->mOptions->getInterfaceMessage() ? $wgLang : $wgContLang;
+                       return $this->mOptions->getInterfaceMessage() ? $wgLang : $this->mTitle->getPageLanguage();
                }
        }