From: Alexandre Emsenhuber Date: Sun, 10 Jul 2011 07:33:29 +0000 (+0000) Subject: Disable feed mode when including the page. I know that there is already r87705 to... X-Git-Tag: 1.31.0-rc.0~28955 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=0f405e77b116e4d9606bb424c70793d50bc3cf5d;p=lhc%2Fweb%2Fwiklou.git 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. --- 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 );