Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -502,7 +502,15 @@ |
503 | 503 | // Handled by extension |
504 | 504 | } else { |
505 | 505 | // Normal page |
506 | | - $wikiPage = WikiPage::factory( $this->mNewPage ); |
| 506 | + if ( $this->getTitle()->equals( $this->mNewPage ) ) { |
| 507 | + // If the Title stored in the context is the same as the one |
| 508 | + // of the new revision, we can use its associated WikiPage |
| 509 | + // object. |
| 510 | + $wikiPage = $this->getWikiPage(); |
| 511 | + } else { |
| 512 | + // Otherwise we need to create our own WikiPage object |
| 513 | + $wikiPage = WikiPage::factory( $this->mNewPage ); |
| 514 | + } |
507 | 515 | |
508 | 516 | $parserOptions = ParserOptions::newFromContext( $this->getContext() ); |
509 | 517 | $parserOptions->enableLimitReport(); |