Stop loading feed.php every time by moving available feeds classes in defines.php...
authorAntoine Musso <hashar@users.mediawiki.org>
Fri, 17 Sep 2004 23:08:22 +0000 (23:08 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Fri, 17 Sep 2004 23:08:22 +0000 (23:08 +0000)
includes/Defines.php
includes/Feed.php
includes/Skin.php

index 0233d65..819bfe1 100644 (file)
@@ -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',
+       );
 ?>
index 8b36446..f154c86 100644 (file)
 
 /**
  * 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
index c3df976..262c497 100644 (file)
@@ -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