From 81a5b667a9215338b08b01862f001d7a542c516d Mon Sep 17 00:00:00 2001 From: Priyanka Dhanda Date: Mon, 18 Oct 2010 18:20:19 +0000 Subject: [PATCH] Added to DefaultSettings --- includes/DefaultSettings.php | 1 + includes/diff/DifferenceInterface.php | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 11077f2303..a886751d2c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5121,6 +5121,7 @@ $wgRepositoryPackageStates = array( */ $wgEnableSelenium = false; $wgSeleniumTestConfigs = array(); +$wgSeleniumConfigFile = null; diff --git a/includes/diff/DifferenceInterface.php b/includes/diff/DifferenceInterface.php index f59aa56ba1..82bd20ade4 100644 --- a/includes/diff/DifferenceInterface.php +++ b/includes/diff/DifferenceInterface.php @@ -456,21 +456,23 @@ CONTROL; $wgOut->addHTML( htmlspecialchars( $this->mNewtext ) ); $wgOut->addHTML( "\n\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() ) { + $wgOut->parserOptions()->setEditSection( $oldEditSectionSetting ); + } + } - 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(); -- 2.20.1