From 7e4248060bf238a0f50f009008b205c3ee750d89 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 19 Nov 2011 08:54:03 +0000 Subject: [PATCH] Use ParserOptions::newFromContext() instead of 'new ParserOptions' to use the local context instead of relying on $wgUser and $wgLang --- includes/api/ApiExpandTemplates.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiExpandTemplates.php b/includes/api/ApiExpandTemplates.php index 7fbbb5630c..cf2bc46791 100644 --- a/includes/api/ApiExpandTemplates.php +++ b/includes/api/ApiExpandTemplates.php @@ -54,7 +54,7 @@ class ApiExpandTemplates extends ApiBase { // Parse text global $wgParser; - $options = new ParserOptions(); + $options = ParserOptions::newFromContext( $this->getContext() ); if ( $params['includecomments'] ) { $options->setRemoveComments( false ); -- 2.20.1