<?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
* @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 );
}
* @todo document
*/
function getLanguage() {
- global $wgLanguageCode;
- return $wgLanguageCode;
+ global $wgContLanguageCode;
+ return $wgContLanguageCode;
}
/**
* @todo document
* @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 ) );
}
/**
*/
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 ) );
}
/**