diff options
author | Pascal Chevrel <pascal@chevrel.org> | 2012-02-26 15:22:50 +0100 |
---|---|---|
committer | Pascal Chevrel <pascal@chevrel.org> | 2012-02-26 15:22:50 +0100 |
commit | 7cf7115c6e8262b21e55bf3b9cc0865bd82a3dc0 (patch) | |
tree | 34f6ac5b3148493fa66ef284d6478f87ad18032f /custom | |
parent | ffc06bff042e4ad33b9bd8784ee4cdb81ffa61ef (diff) | |
download | planet-7cf7115c6e8262b21e55bf3b9cc0865bd82a3dc0.tar planet-7cf7115c6e8262b21e55bf3b9cc0865bd82a3dc0.tar.gz planet-7cf7115c6e8262b21e55bf3b9cc0865bd82a3dc0.tar.bz2 planet-7cf7115c6e8262b21e55bf3b9cc0865bd82a3dc0.tar.xz planet-7cf7115c6e8262b21e55bf3b9cc0865bd82a3dc0.zip |
fix Mime Type for Atom feed
Diffstat (limited to 'custom')
-rw-r--r-- | custom/views/atom10/index.tpl.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/custom/views/atom10/index.tpl.php b/custom/views/atom10/index.tpl.php index 96b467a..d515961 100644 --- a/custom/views/atom10/index.tpl.php +++ b/custom/views/atom10/index.tpl.php @@ -1,8 +1,8 @@ <?php
$limit = $PlanetConfig->getMaxDisplay();
-$count = 0; - -header('Content-Type: text/plain; charset=UTF-8'); +$count = 0;
+
+header('Content-Type: application/atom+xml; charset=UTF-8');
echo '<?xml version="1.0" encoding="UTF-8" ?>';
?><feed xmlns="http://www.w3.org/2005/Atom">
<title><?php echo $PlanetConfig->getName(); ?></title>
@@ -12,7 +12,7 @@ echo '<?xml version="1.0" encoding="UTF-8" ?>'; <link rel="alternate" type="text/html" href="<?php echo $PlanetConfig->getUrl(); ?>" />
<updated><?php echo date("Y-m-d\TH:i:s\Z") ?></updated>
<author><name>Author</name></author>
-
+
<?php $count = 0; ?>
<?php foreach ($items as $item): ?>
<entry xmlns="http://www.w3.org/2005/Atom">
@@ -21,9 +21,9 @@ echo '<?xml version="1.0" encoding="UTF-8" ?>'; <link rel="alternate" href="<?php echo htmlspecialchars($item->get_permalink());?>"/>
<published><?php echo $item->get_date('Y-m-d\\TH:i:s+00:00'); ?></published>
<author><name><?php echo ($item->get_author()? $item->get_author()->get_name() : 'anonymous'); ?></name></author>
-
+
<content type="html"><![CDATA[<?php echo $item->get_content();?>]]></content>
</entry>
<?php if (++$count == $limit) { break; } ?>
<?php endforeach; ?>
-</feed>
\ No newline at end of file +</feed>
|