Index: trunk/phase3/includes/diff/DifferenceInterface.php |
— | — | @@ -456,21 +456,24 @@ |
457 | 457 | $wgOut->addHTML( htmlspecialchars( $this->mNewtext ) ); |
458 | 458 | $wgOut->addHTML( "\n</pre>\n" ); |
459 | 459 | } |
460 | | - } elseif( $pCache ) { |
461 | | - $article = new Article( $this->mTitle, 0 ); |
462 | | - $pOutput = ParserCache::singleton()->get( $article, $wgOut->parserOptions() ); |
463 | | - if( $pOutput ) { |
464 | | - $wgOut->addParserOutput( $pOutput ); |
| 460 | + } elseif( wfRunHooks( 'ArticleContentOnDiff', array( $this, &$wgOut ) ) ) { |
| 461 | + //TODO: document this hook |
| 462 | + if( $pCache ) { |
| 463 | + $article = new Article( $this->mTitle, 0 ); |
| 464 | + $pOutput = ParserCache::singleton()->get( $article, $wgOut->parserOptions() ); |
| 465 | + if( $pOutput ) { |
| 466 | + $wgOut->addParserOutput( $pOutput ); |
| 467 | + } else { |
| 468 | + $article->doViewParse(); |
| 469 | + } |
465 | 470 | } else { |
466 | | - $article->doViewParse(); |
| 471 | + $wgOut->addWikiTextTidy( $this->mNewtext ); |
467 | 472 | } |
468 | | - } else { |
469 | | - $wgOut->addWikiTextTidy( $this->mNewtext ); |
| 473 | + if( is_object( $this->mNewRev ) && !$this->mNewRev->isCurrent() ) { |
| 474 | + $wgOut->parserOptions()->setEditSection( $oldEditSectionSetting ); |
| 475 | + } |
470 | 476 | } |
471 | | - |
472 | | - if( is_object( $this->mNewRev ) && !$this->mNewRev->isCurrent() ) { |
473 | | - $wgOut->parserOptions()->setEditSection( $oldEditSectionSetting ); |
474 | | - } |
| 477 | + |
475 | 478 | # Add redundant patrol link on bottom... |
476 | 479 | if( $this->mRcidMarkPatrolled && $this->mTitle->quickUserCan('patrol') ) { |
477 | 480 | $sk = $wgUser->getSkin(); |