diff options
-rw-r--r-- | includes/Feed.php | 7 | ||||
-rw-r--r-- | includes/OutputPage.php | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/includes/Feed.php b/includes/Feed.php index 9a7198adade4..95f8e8c4ab52 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"; - ?><feed version="0.3" xml:lang="<?php print $this->getLanguage()."-".$this->getLanguage() ?>"> + ?><feed version="0.3" xml:lang="<?php print $this->getLanguage() ?>"> <title><?php print $this->getTitle() ?></title> <link rel="alternate" type="text/html" href="<?php print $this->getUrl() ?>"/> <modified><?php print $this->formatTime( wfTimestampNow() ) ?>Z</modified> @@ -158,17 +158,18 @@ class AtomFeed extends ChannelFeed { } function outItem( $item ) { + global $wgMimeType; ?> <entry> <title><?php print $item->getTitle() ?></title> - <link rel="alternate" type="text/html" href="<?php print $item->getUrl() ?>"/> + <link rel="alternate" type="<?php print $wgMimeType ?>" href="<?php print $item->getUrl() ?>"/> <?php if( $item->getDate() ) { ?> <modified><?php print $this->formatTime( $item->getDate() ) ?>Z</modified> <issued><?php print $this->formatTime( $item->getDate() ) ?></issued> <created><?php print $this->formatTime( $item->getDate() ) ?>Z</created><?php } ?> <summary type="text/plain"><?php print $item->getDescription() ?></summary> - <?php if( $item->getAuthor() ) { ?><author><name><?php print $item->getAuthor() ?></name><url></url><email></email></author><?php }?> + <?php if( $item->getAuthor() ) { ?><author><name><?php print $item->getAuthor() ?></name><!-- <url></url><email></email> --></author><?php }?> <comment>foobar</comment> </entry> diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 6f0992670d91..1e0e42338464 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 .= "<link rel='alternate' type='application/rss+xml' title='RSS' href='$link' />\n"; + $ret .= "<link rel='alternate' type='application/rss+xml' title='RSS 2.0' href='$link' />\n"; + $link = $wgRequest->escapeAppendQuery( "feed=atom" ); + $ret .= "<link rel='alternate' type='application/rss+atom' title='Atom 0.3' href='$link' />\n"; } # FIXME: get these working # $fix = htmlspecialchars( $wgStylePath . "/ie-png-fix.js" ); |