From: Alexandre Emsenhuber Date: Sat, 19 Nov 2011 08:54:03 +0000 (+0000) Subject: Use ParserOptions::newFromContext() instead of 'new ParserOptions' to use the local... X-Git-Tag: 1.31.0-rc.0~26427 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=7e4248060bf238a0f50f009008b205c3ee750d89;p=lhc%2Fweb%2Fwiklou.git Use ParserOptions::newFromContext() instead of 'new ParserOptions' to use the local context instead of relying on $wgUser and $wgLang --- 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 );