Introducing $wgFeed variable. Allows tuning sydication feeds off, when desired.
[lhc/web/wiklou.git] / includes / PageHistory.php
index 0c44682..2cd56f9 100644 (file)
@@ -483,7 +483,14 @@ class PageHistory {
        function feed( $type ) {
                require_once 'SpecialRecentchanges.php';
                
-               global $wgFeedClasses;
+               global $wgFeed, $wgFeedClasses;
+               
+               if ( !$wgFeed ) {
+                       global $wgOut;
+                       $wgOut->addWikiMsg( 'feed-unavailable' );
+                       return;
+               }
+               
                if( !isset( $wgFeedClasses[$type] ) ) {
                        global $wgOut;
                        $wgOut->addWikiMsg( 'feed-invalid' );