Tell regexp parser to use extra analysis on external link regexp;
[lhc/web/wiklou.git] / includes / Feed.php
index f50d7ee..3ac7fe3 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+# $Id$
 # Basic support for outputting syndication feeds in RSS, other formats
 # 
 # Copyright (C) 2004 Brion Vibber <brion@pobox.com>
 
 /**
  * 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
@@ -65,10 +60,10 @@ class FeedItem {
         * @todo document
         */
        function xmlEncode( $string ) {
-               global $wgInputEncoding, $wgLang;
+               global $wgInputEncoding, $wgContLang;
                $string = str_replace( "\r\n", "\n", $string );
                if( strcasecmp( $wgInputEncoding, 'utf-8' ) != 0 ) {
-                       $string = $wgLang->iconv( $wgInputEncoding, 'utf-8', $string );
+                       $string = $wgContLang->iconv( $wgInputEncoding, 'utf-8', $string );
                }
                return htmlspecialchars( $string );
        }
@@ -89,8 +84,8 @@ class FeedItem {
         * @todo document
         */
        function getLanguage() {
-               global $wgLanguageCode;
-               return $wgLanguageCode;
+               global $wgContLanguageCode;
+               return $wgContLanguageCode;
        }
        /**
         * @todo document
@@ -170,7 +165,7 @@ class RSSFeed extends ChannelFeed {
         * @return string Date string
         */
        function formatTime( $ts ) {
-               return gmdate( 'D, d M Y H:i:s \G\M\T', wfTimestamp2Unix( $ts ) );
+               return gmdate( 'D, d M Y H:i:s \G\M\T', wfTimestamp( TS_UNIX, $ts ) );
        }
        
        /**
@@ -229,7 +224,7 @@ class AtomFeed extends ChannelFeed {
         */
        function formatTime( $ts ) {
                // need to use RFC 822 time format at least for rss2.0
-               return gmdate( 'Y-m-d\TH:i:s', wfTimestamp2Unix( $ts ) );
+               return gmdate( 'Y-m-d\TH:i:s', wfTimestamp( TS_UNIX, $ts ) );
        }
 
        /**