summaryrefslogtreecommitdiffstats
path: root/custom/views
diff options
context:
space:
mode:
authorPascal Chevrel <pascal@chevrel.org>2012-05-05 22:39:34 +0200
committerPascal Chevrel <pascal@chevrel.org>2012-05-05 22:39:34 +0200
commit2c494ce0492c9b0b38c3fc989105ad7bac9c8580 (patch)
tree3cbe548c152bf19199b43f0e020161e6aecd1408 /custom/views
parent2d5084e43c0263e1257f294b3a8631776d343220 (diff)
downloadplanet-2c494ce0492c9b0b38c3fc989105ad7bac9c8580.tar
planet-2c494ce0492c9b0b38c3fc989105ad7bac9c8580.tar.gz
planet-2c494ce0492c9b0b38c3fc989105ad7bac9c8580.tar.bz2
planet-2c494ce0492c9b0b38c3fc989105ad7bac9c8580.tar.xz
planet-2c494ce0492c9b0b38c3fc989105ad7bac9c8580.zip
Issue 42: create atom.php at root, delete old 'atom10' template, update all internal links to point to the new location, put a redirect in place so as that moonmoon installs don't loose their users upon upgrading to a newer moonmoon
Diffstat (limited to 'custom/views')
-rw-r--r--custom/views/archive/head.tpl.php2
-rwxr-xr-xcustom/views/archive/sidebar.tpl.php2
-rw-r--r--custom/views/atom10/index.tpl.php30
-rw-r--r--custom/views/default/head.tpl.php2
-rwxr-xr-xcustom/views/default/sidebar.tpl.php2
5 files changed, 4 insertions, 34 deletions
diff --git a/custom/views/archive/head.tpl.php b/custom/views/archive/head.tpl.php
index 03f99ae..005a75d 100644
--- a/custom/views/archive/head.tpl.php
+++ b/custom/views/archive/head.tpl.php
@@ -3,4 +3,4 @@
<link rel="stylesheet" media="screen" type="text/css" href="custom/style/light.css" title="Light" />
<link rel="stylesheet" media="screen" type="text/css" href="custom/style/dark.css" title="Dark" />
- <link rel="alternate" type="application/atom+xml" title="ATOM" href="?type=atom10" />
+ <link rel="alternate" type="application/atom+xml" title="ATOM" href="atom.php" />
diff --git a/custom/views/archive/sidebar.tpl.php b/custom/views/archive/sidebar.tpl.php
index 3f0d617..e21f377 100755
--- a/custom/views/archive/sidebar.tpl.php
+++ b/custom/views/archive/sidebar.tpl.php
@@ -21,7 +21,7 @@ usort($all_people, array('PlanetFeed', 'compare'));
<div>
<h2><?=_g('Syndicate')?></h2>
<ul>
- <li><img src="custom/img/feed.png" alt="<?=_g('Feed')?>" height="12" width="12" />&nbsp;<a href="?type=atom10"><?=_g('Feed (ATOM)')?></a></li>
+ <li><img src="custom/img/feed.png" alt="<?=_g('Feed')?>" height="12" width="12" />&nbsp;<a href="atom.php"><?=_g('Feed (ATOM)')?></a></li>
</ul>
</div>
diff --git a/custom/views/atom10/index.tpl.php b/custom/views/atom10/index.tpl.php
deleted file mode 100644
index d88f17b..0000000
--- a/custom/views/atom10/index.tpl.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-$limit = $PlanetConfig->getMaxDisplay();
-$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 htmlspecialchars($PlanetConfig->getName()); ?></title>
- <subtitle><?php echo htmlspecialchars($PlanetConfig->getName()); ?></subtitle>
- <id><?php echo $PlanetConfig->getUrl(); ?></id>
- <link rel="self" type="application/atom+xml" href="<?php echo $PlanetConfig->getUrl(); ?>?type=atom10" />
- <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>
- <title type="html"><?php echo htmlspecialchars($item->get_feed()->getName()); ?> : <?php echo htmlspecialchars($item->get_title());?></title>
- <id><?php echo htmlspecialchars($item->get_permalink());?></id>
- <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>
- <updated><?php echo $item->get_date('Y-m-d\\TH:i:s+00:00'); ?></updated>
- <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>
diff --git a/custom/views/default/head.tpl.php b/custom/views/default/head.tpl.php
index 6e204fe..5773aa6 100644
--- a/custom/views/default/head.tpl.php
+++ b/custom/views/default/head.tpl.php
@@ -1,3 +1,3 @@
<link rel="stylesheet" media="screen" type="text/css" href="custom/style/default.css" title="Default" />
- <link rel="alternate" type="application/atom+xml" title="ATOM" href="?type=atom10" />
+ <link rel="alternate" type="application/atom+xml" title="ATOM" href="atom.php" />
diff --git a/custom/views/default/sidebar.tpl.php b/custom/views/default/sidebar.tpl.php
index 2a3a360..830f3c6 100755
--- a/custom/views/default/sidebar.tpl.php
+++ b/custom/views/default/sidebar.tpl.php
@@ -21,7 +21,7 @@ usort($all_people, array('PlanetFeed', 'compare'));
<div class="section">
<h2><?=_g('Syndicate')?></h2>
<ul>
- <li><img src="custom/img/feed.png" alt="<?=_g('Feed')?>" height="12" width="12" />&nbsp;<a href="?type=atom10"><?=_g('Feed (ATOM)')?></a></li>
+ <li><img src="custom/img/feed.png" alt="<?=_g('Feed')?>" height="12" width="12" />&nbsp;<a href="atom.php"><?=_g('Feed (ATOM)')?></a></li>
</ul>
</div>