Page MenuHomePhabricator

bug25289_proposal2.patch

Authored By
bzimport
Nov 21 2014, 11:16 PM
Size
1 KB
Referenced Files
None
Subscribers
None

bug25289_proposal2.patch

Index: includes/diff/DifferenceInterface.php
===================================================================
--- includes/diff/DifferenceInterface.php (revisión: 74251)
+++ includes/diff/DifferenceInterface.php (copia de trabajo)
@@ -456,16 +456,18 @@
$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 ) ) ) {
+ 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 );
}
- } else {
- $wgOut->addWikiTextTidy( $this->mNewtext );
}
if( is_object( $this->mNewRev ) && !$this->mNewRev->isCurrent() ) {

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6656
Default Alt Text
bug25289_proposal2.patch (1 KB)

Event Timeline