Introducing $wgFeed variable. Allows tuning sydication feeds off, when desired.
[lhc/web/wiklou.git] / includes / SpecialRecentchanges.php
index 60a04e0..2fee735 100644 (file)
@@ -326,6 +326,13 @@ function rcFilterByCategories ( &$rows , $categories , $any ) {
 function rcOutputFeed( $rows, $feedFormat, $limit, $hideminor, $lastmod ) {
        global $messageMemc, $wgFeedCacheTimeout;
        global $wgFeedClasses, $wgTitle, $wgSitename, $wgContLanguageCode;
+       global $wgFeed;
+       
+       if ( !$wgFeed ) {
+               global $wgOut;
+               $wgOut->addWikiMsg( 'feed-unavailable' );
+               return;
+       }
 
        if( !isset( $wgFeedClasses[$feedFormat] ) ) {
                wfHttpError( 500, "Internal Server Error", "Unsupported feed type." );