$wgOut->addHTML( htmlspecialchars( $this->mNewtext ) );
$wgOut->addHTML( "\n</pre>\n" );
}
- } elseif( $pCache ) {
- $article = new Article( $this->mTitle, 0 );
- $pOutput = ParserCache::singleton()->get( $article, $wgOut->parserOptions() );
- if( $pOutput ) {
- $wgOut->addParserOutput( $pOutput );
+ } elseif( wfRunHooks( 'ArticleContentOnDiff', array( $this, &$wgOut ) ) ) {
+ //TODO: document this hook
+ if( $pCache ) {
+ $article = new Article( $this->mTitle, 0 );
+ $pOutput = ParserCache::singleton()->get( $article, $wgOut->parserOptions() );
+ if( $pOutput ) {
+ $wgOut->addParserOutput( $pOutput );
+ } else {
+ $article->doViewParse();
+ }
} else {
- $article->doViewParse();
+ $wgOut->addWikiTextTidy( $this->mNewtext );
+ }
+ if( is_object( $this->mNewRev ) && !$this->mNewRev->isCurrent() ) {
+ $wgOut->parserOptions()->setEditSection( $oldEditSectionSetting );
}
- } else {
- $wgOut->addWikiTextTidy( $this->mNewtext );
- }
-
- if( is_object( $this->mNewRev ) && !$this->mNewRev->isCurrent() ) {
- $wgOut->parserOptions()->setEditSection( $oldEditSectionSetting );
}
+
# Add redundant patrol link on bottom...
if( $this->mRcidMarkPatrolled && $this->mTitle->quickUserCan('patrol') ) {
$sk = $wgUser->getSkin();