Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -4531,6 +4531,7 @@ |
4532 | 4532 | |
4533 | 4533 | /** |
4534 | 4534 | * Remove a specific tag hook. Should not be called on $wgParser. |
| 4535 | + * Does not change the strip list. |
4535 | 4536 | * |
4536 | 4537 | * @param string $tag |
4537 | 4538 | * @return void |
— | — | @@ -4538,10 +4539,6 @@ |
4539 | 4540 | function clearTagHook( $tag ) { |
4540 | 4541 | if ( isset( $this->mTagHooks[$tag] ) ) { |
4541 | 4542 | unset( $this->mTagHooks[$tag] ); |
4542 | | - $key = array_search( $tag, $this->mStripList ); |
4543 | | - if ( $key !== false ) { |
4544 | | - unset( $this->mStripList[$key] ); |
4545 | | - } |
4546 | 4543 | } |
4547 | 4544 | } |
4548 | 4545 | |
Index: trunk/extensions/FlaggedRevs/business/RevisionReviewForm.php |
— | — | @@ -601,13 +601,21 @@ |
602 | 602 | if ( is_array( $val ) ) { |
603 | 603 | $versions = $val; // cache hit |
604 | 604 | } else { |
605 | | - $title = $article->getTitle(); |
606 | | - $pOpts = ParserOptions::newFromUser( $user ); // Note: tidy off |
607 | | - # Disable slow crap that doesn't matter for getting templates/files... |
608 | | - $parser = clone $wgParser; |
609 | | - $parser->clearTagHook( 'ref' ); |
610 | | - $parser->clearTagHook( 'references' ); |
611 | | - $pOut = $parser->parse( $rev->getText(), $title, $pOpts, $rev->getId() ); |
| 605 | + $pOut = false; |
| 606 | + if ( $rev->isCurrent() ) { // try current version parser cache |
| 607 | + $parserCache = ParserCache::singleton(); |
| 608 | + $pOut = $parserCache->get( $article, $article->makeParserOptions( $user ) ); |
| 609 | + } |
| 610 | + if ( $pOut == false ) { |
| 611 | + $title = $article->getTitle(); |
| 612 | + $pOpts = ParserOptions::newFromUser( $user ); // Note: tidy off |
| 613 | + # Disable slow crap that doesn't matter for getting templates/files... |
| 614 | + $parser = clone $wgParser; |
| 615 | + $parser->clearTagHook( 'ref' ); |
| 616 | + $parser->clearTagHook( 'references' ); |
| 617 | + $pOut = $parser->parse( |
| 618 | + $rev->getText(), $title, $pOpts, true, true, $rev->getId() ); |
| 619 | + } |
612 | 620 | # Get the template/file versions used... |
613 | 621 | $versions = array( $pOut->getTemplateIds(), $pOut->getImageTimeKeys() ); |
614 | 622 | # Save to cache... |