Disable feed mode when including the page. I know that there is already r87705 to...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 10 Jul 2011 07:33:29 +0000 (07:33 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 10 Jul 2011 07:33:29 +0000 (07:33 +0000)
includes/specials/SpecialRecentchanges.php

index c5d1680..941dc17 100644 (file)
@@ -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 );