r91820 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91819‎ | r91820 | r91821 >
Date:07:33, 10 July 2011
Author:ialex
Status:ok
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -111,9 +111,13 @@
112112 */
113113 public function getOptions() {
114114 if ( $this->rcOptions === null ) {
115 - global $wgRequest;
116 - $feedFormat = $wgRequest->getVal( 'feed' );
117 - $this->rcOptions = $feedFormat ? $this->feedSetup() : $this->setup( $this->rcSubpage );
 115+ if ( $this->including() ) {
 116+ $isFeed = false;
 117+ } else {
 118+ global $wgRequest;
 119+ $isFeed = (bool)$wgRequest->getVal( 'feed' );
 120+ }
 121+ $this->rcOptions = $isFeed ? $this->feedSetup() : $this->setup( $this->rcSubpage );
118122 }
119123 return $this->rcOptions;
120124 }
@@ -127,7 +131,7 @@
128132 public function execute( $subpage ) {
129133 global $wgRequest, $wgOut;
130134 $this->rcSubpage = $subpage;
131 - $feedFormat = $wgRequest->getVal( 'feed' );
 135+ $feedFormat = $this->including() ? null : $wgRequest->getVal( 'feed' );
132136
133137 # 10 seconds server-side caching max
134138 $wgOut->setSquidMaxage( 10 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87705Make it so that when a special page is trancluded, the output won't vary by u...bawolff06:42, 9 May 2011

Status & tagging log