Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -427,6 +427,10 @@ |
428 | 428 | wfProfileIn( __METHOD__ ); |
429 | 429 | |
430 | 430 | $wgOut->addHTML( "<hr /><h2>{$this->mPagetitle}</h2>\n" ); |
| 431 | + if ( !wfRunHooks( 'ArticleContentOnDiff', array( $this, $wgOut ) ) ) { |
| 432 | + return; |
| 433 | + } |
| 434 | + |
431 | 435 | # Add deleted rev tag if needed |
432 | 436 | if ( !$this->mNewRev->userCan( Revision::DELETED_TEXT ) ) { |
433 | 437 | $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1\n</div>\n", 'rev-deleted-text-permission' ); |
— | — | @@ -456,19 +460,17 @@ |
457 | 461 | $wgOut->addHTML( htmlspecialchars( $this->mNewtext ) ); |
458 | 462 | $wgOut->addHTML( "\n</pre>\n" ); |
459 | 463 | } |
460 | | - } elseif ( wfRunHooks( 'ArticleContentOnDiff', array( $this, $wgOut ) ) ) { |
461 | | - if ( $pCache ) { |
462 | | - $article = new Article( $this->mTitle, 0 ); |
463 | | - $pOutput = ParserCache::singleton()->get( $article, $wgOut->parserOptions() ); |
464 | | - if ( $pOutput ) { |
465 | | - $wgOut->addParserOutput( $pOutput ); |
466 | | - } else { |
467 | | - $article->doViewParse(); |
468 | | - } |
| 464 | + } elseif ( $pCache ) { |
| 465 | + $article = new Article( $this->mTitle, 0 ); |
| 466 | + $pOutput = ParserCache::singleton()->get( $article, $wgOut->parserOptions() ); |
| 467 | + if( $pOutput ) { |
| 468 | + $wgOut->addParserOutput( $pOutput ); |
469 | 469 | } else { |
470 | | - $wgOut->addWikiTextTidy( $this->mNewtext ); |
471 | | - } |
472 | | - } |
| 470 | + $article->doViewParse(); |
| 471 | + } |
| 472 | + } else { |
| 473 | + $wgOut->addWikiTextTidy( $this->mNewtext ); |
| 474 | + } |
473 | 475 | |
474 | 476 | if ( is_object( $this->mNewRev ) && !$this->mNewRev->isCurrent() ) { |
475 | 477 | $wgOut->parserOptions()->setEditSection( $oldEditSectionSetting ); |