git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nieuws/feed: canonical site references
[minimedit.git]
/
nieuws
/
feed
/
index.php
diff --git
a/nieuws/feed/index.php
b/nieuws/feed/index.php
index eff920365409f891b15d496dd1674119e82fb377..11138cea86cb37cbb233a80bfef401b22ac6c65c 100644
(file)
--- a/
nieuws/feed/index.php
+++ b/
nieuws/feed/index.php
@@
-1,14
+1,15
@@
<?php
ob_clean();
<?php
ob_clean();
+header('Content-Type: application/atom+xml; charset=utf-8');
print '<?xml version="1.0" encoding="utf-8"?>';
print '<?xml version="1.0" encoding="utf-8"?>';
-$siteref =
'http://'.
$_SERVER['HTTP_HOST'];
+$siteref =
(empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' .
$_SERVER['HTTP_HOST'];
?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Lijtweg.nl</title>
<subtitle>Nieuwsberichten</subtitle>
?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Lijtweg.nl</title>
<subtitle>Nieuwsberichten</subtitle>
- <id><?= $siteref ?></id>
- <link href="<?= $siteref ?>" />
+ <id><?= $siteref ?>
/
</id>
+ <link href="<?= $siteref ?>
/
" />
<link href="<?= $siteref . $_SERVER['REQUEST_URI'] ?>" rel="self" />
<author><name>Lijtweg</name></author>
<?php
<link href="<?= $siteref . $_SERVER['REQUEST_URI'] ?>" rel="self" />
<author><name>Lijtweg</name></author>
<?php
@@
-29,8
+30,9
@@
foreach ($pages as $i => $page) {
<link href="/<?= $article->link ?>" />
<title><?= $article->title ?></title>
<published><?= $article->dateiso ?></published>
<link href="/<?= $article->link ?>" />
<title><?= $article->title ?></title>
<published><?= $article->dateiso ?></published>
- <updated><?= $article->lastiso ?></updated>
- <content type="html"><?= htmlspecialchars($article->body) ?></content>
+ <updated><?= $article->dateiso ?></updated>
+ <content type="html"><?= htmlspecialchars($article->body) ?>
+ </content>
<?php
if ($article->thumb) {
printf("\t\t".'<link rel="enclosure" type="%s" length="%d" href="%s" />'."\n",
<?php
if ($article->thumb) {
printf("\t\t".'<link rel="enclosure" type="%s" length="%d" href="%s" />'."\n",