From: Brion Vibber Date: Wed, 28 Apr 2004 06:14:49 +0000 (+0000) Subject: Add atom feed when syndication is on. X-Git-Tag: 1.3.0beta1~227 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=0ffaed11ffdff03ef64f96f701974f61ceb46f19;p=lhc%2Fweb%2Fwiklou.git Add atom feed when syndication is on. Fix language marker on Atom feed head element. Comment out empty dead fields in in atom output. --- diff --git a/includes/Feed.php b/includes/Feed.php index 9a7198adad..95f8e8c4ab 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -147,7 +147,7 @@ class AtomFeed extends ChannelFeed { $wgOut->sendCacheControl(); print '<' . '?xml version="1.0" encoding="utf-8"?' . ">\n"; - ?>getLanguage() ?>"> + ?> <?php print $this->getTitle() ?> formatTime( wfTimestampNow() ) ?>Z @@ -158,17 +158,18 @@ class AtomFeed extends ChannelFeed { } function outItem( $item ) { + global $wgMimeType; ?> <?php print $item->getTitle() ?> - + getDate() ) { ?> formatTime( $item->getDate() ) ?>Z formatTime( $item->getDate() ) ?> formatTime( $item->getDate() ) ?>Z getDescription() ?> - getAuthor() ) { ?>getAuthor() ?> + getAuthor() ) { ?>getAuthor() ?> foobar diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 6f0992670d..1e0e423384 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -699,8 +699,11 @@ class OutputPage { $ret .= " />\n"; } if( $this->isSyndicated() ) { + # FIXME: centralize the mime-type and name information in Feed.php $link = $wgRequest->escapeAppendQuery( "feed=rss" ); - $ret .= "\n"; + $ret .= "\n"; + $link = $wgRequest->escapeAppendQuery( "feed=atom" ); + $ret .= "\n"; } # FIXME: get these working # $fix = htmlspecialchars( $wgStylePath . "/ie-png-fix.js" );