* @return ParserOutput
*/
private function parseInternal( $text, $title, $linestart, $tidy, $interface, $language ) {
- global $wgParser;
-
if ( is_null( $title ) ) {
throw new MWException( 'Empty $mTitle in ' . __METHOD__ );
}
$oldLang = $popts->setTargetLanguage( $language );
}
- $parserOutput = $wgParser->getFreshParser()->parse(
+ $parserOutput = MediaWikiServices::getInstance()->getParser()->getFreshParser()->parse(
$text, $title, $popts,
$linestart, true, $this->mRevisionId
);
$title = $this->getTitle();
$ns = $title->getNamespace();
- $canonicalNamespace = MWNamespace::exists( $ns )
- ? MWNamespace::getCanonicalName( $ns )
+ $nsInfo = MediaWikiServices::getInstance()->getNamespaceInfo();
+ $canonicalNamespace = $nsInfo->exists( $ns )
+ ? $nsInfo->getCanonicalName( $ns )
: $title->getNsText();
$sk = $this->getSkin();