From e57ac87ceb707957788885963befa7ad68d0798a Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Fri, 17 Sep 2004 23:08:22 +0000 Subject: [PATCH] Stop loading feed.php every time by moving available feeds classes in defines.php and removing call from skin.php --- includes/Defines.php | 10 ++++++++++ includes/Feed.php | 8 +------- includes/Skin.php | 2 -- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/includes/Defines.php b/includes/Defines.php index 0233d65eac..819bfe1c84 100644 --- a/includes/Defines.php +++ b/includes/Defines.php @@ -52,4 +52,14 @@ define('NS_WP_TALK', NS_PROJECT_TALK); define('NS_WIKIPEDIA', NS_PROJECT); define('NS_WIKIPEDIA_TALK', NS_PROJECT_TALK); /**#@-*/ + +/** + * Available feeds objects + * Should probably only be defined when a page is syndicated ie when + * $wgOut->isSyndicated() is true + */ +$wgFeedClasses = array( + 'rss' => 'RSSFeed', + 'atom' => 'AtomFeed', + ); ?> diff --git a/includes/Feed.php b/includes/Feed.php index 8b364469b5..f154c861bc 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -22,16 +22,10 @@ /** * Contain a feed class as well as classes to build rss / atom ... feeds + * Available feeds are defined in Defines.php * @package MediaWiki */ -/** - * Available feeds objects - */ -$wgFeedClasses = array( - 'rss' => 'RSSFeed', - 'atom' => 'AtomFeed', - ); /** * @todo document diff --git a/includes/Skin.php b/includes/Skin.php index c3df976a06..262c497f4e 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -11,8 +11,6 @@ if( defined( "MEDIAWIKI" ) ) { # See skin.doc - -require_once( 'Feed.php' ); // should not be called if the actual page isn't feed enabled require_once( 'Image.php' ); # These are the INTERNAL names, which get mapped directly to class names and -- 2.20.1