Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -161,8 +161,7 @@ |
162 | 162 | # Make our hooks to trigger |
163 | 163 | $wgParser->fr_isStable = true; |
164 | 164 | # Parse with default options |
165 | | - $options = new ParserOptions(); |
166 | | - $options->setRemoveComments( true ); // Save some bandwidth ;) |
| 165 | + $options = self::makeParserOptions(); |
167 | 166 | $outputText = $wgParser->preprocess( $text, $title, $options, $id ); |
168 | 167 | $out =& $wgParser->mOutput; |
169 | 168 | $data = array( $outputText, $out->mTemplates, $out->mTemplateIds, $out->fr_includeErrors, $out->fr_newestTemplateID ); |
— | — | @@ -226,8 +225,9 @@ |
227 | 226 | /** |
228 | 227 | * Get standard parser options |
229 | 228 | */ |
230 | | - public static function makeParserOptions( $user = NULL ) { |
231 | | - $options = $user ? ParserOptions::newFromUser( $user ) : new ParserOptions(); |
| 229 | + public static function makeParserOptions() { |
| 230 | + global $wgUser; |
| 231 | + $options = ParserOptions::newFromUser($wgUser); |
232 | 232 | # Show inclusion/loop reports |
233 | 233 | $options->enableLimitReport(); |
234 | 234 | # Fix bad HTML |
— | — | @@ -454,7 +454,7 @@ |
455 | 455 | if( $currentOutput==false ) { |
456 | 456 | $text = $article->getContent(); |
457 | 457 | $title = $article->getTitle(); |
458 | | - $options = self::makeParserOptions( $wgUser ); |
| 458 | + $options = self::makeParserOptions(); |
459 | 459 | $currentOutput = $wgParser->parse( $text, $title, $options ); |
460 | 460 | # Might as well save the cache while we're at it |
461 | 461 | global $wgEnableParserCache; |
— | — | @@ -557,7 +557,7 @@ |
558 | 558 | $poutput = $parserCache->get( $article, $wgUser ); |
559 | 559 | if( $poutput==false ) { |
560 | 560 | $text = $article->getContent(); |
561 | | - $options = self::makeParserOptions( $wgUser ); |
| 561 | + $options = self::makeParserOptions(); |
562 | 562 | $poutput = $wgParser->parse($text, $article->getTitle(), $options); |
563 | 563 | # Might as well save the cache while we're at it |
564 | 564 | global $wgEnableParserCache; |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.php |
— | — | @@ -621,7 +621,7 @@ |
622 | 622 | $poutput = $parserCache->get( $article, $wgUser ); |
623 | 623 | if( $poutput==false ) { |
624 | 624 | $text = $article->getContent(); |
625 | | - $options = FlaggedRevs::makeParserOptions( $wgUser ); |
| 625 | + $options = FlaggedRevs::makeParserOptions(); |
626 | 626 | $poutput = $wgParser->parse( $text, $article->mTitle, $options ); |
627 | 627 | } |
628 | 628 | # If we know that this is now the new stable version |
— | — | @@ -689,7 +689,7 @@ |
690 | 690 | $poutput = $parserCache->get( $article, $wgUser ); |
691 | 691 | if( $poutput==false ) { |
692 | 692 | $text = $article->getContent(); |
693 | | - $options = FlaggedRevs::makeParserOptions( $wgUser ); |
| 693 | + $options = FlaggedRevs::makeParserOptions(); |
694 | 694 | $poutput = $wgParser->parse( $text, $article->mTitle, $options ); |
695 | 695 | } |
696 | 696 | $u = new LinksUpdate( $this->page, $poutput ); |