From 0f405e77b116e4d9606bb424c70793d50bc3cf5d Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 10 Jul 2011 07:33:29 +0000 Subject: [PATCH] Disable feed mode when including the page. I know that there is already r87705 to address this, but this one is needed for the future. --- includes/specials/SpecialRecentchanges.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index c5d16807bf..941dc17397 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -111,9 +111,13 @@ class SpecialRecentChanges extends IncludableSpecialPage { */ public function getOptions() { if ( $this->rcOptions === null ) { - global $wgRequest; - $feedFormat = $wgRequest->getVal( 'feed' ); - $this->rcOptions = $feedFormat ? $this->feedSetup() : $this->setup( $this->rcSubpage ); + if ( $this->including() ) { + $isFeed = false; + } else { + global $wgRequest; + $isFeed = (bool)$wgRequest->getVal( 'feed' ); + } + $this->rcOptions = $isFeed ? $this->feedSetup() : $this->setup( $this->rcSubpage ); } return $this->rcOptions; } @@ -127,7 +131,7 @@ class SpecialRecentChanges extends IncludableSpecialPage { public function execute( $subpage ) { global $wgRequest, $wgOut; $this->rcSubpage = $subpage; - $feedFormat = $wgRequest->getVal( 'feed' ); + $feedFormat = $this->including() ? null : $wgRequest->getVal( 'feed' ); # 10 seconds server-side caching max $wgOut->setSquidMaxage( 10 ); -- 2.20.1