Skip to content

Commit

Permalink
Fix relative paths in rss feed code
Browse files Browse the repository at this point in the history
  • Loading branch information
gjanssens committed Dec 2, 2017
1 parent 2400375 commit 4cfbe7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions atom.php
@@ -1,7 +1,7 @@
<?php
// TODO:
// - reasonable permalinks
$top_dir = ".";
$top_dir = "..";

$contentType = "application/atom+xml";
if (isset($_GET["content-type"]))
Expand All @@ -12,7 +12,7 @@
header("Content-Type: $contentType; charset=$charset");

$entry_count = 10;
$newsdir = "${top_dir}/news";
$newsdir = "news";

/**
* In php5, this is simply: date(DATE_ATOM, strtotime($news_date)).
Expand All @@ -30,7 +30,7 @@ function date_convert_news_to_atom($news_date)
?>
<?="<?xml version=\"1.0\" encoding=\"$charset\"?>"?>
<?php
include("$top_dir/news/news-script.php");
include("$newsdir/news-script.php");
?>

<feed xmlns="http://www.w3.org/2005/Atom">
Expand Down

0 comments on commit 4cfbe7c

Please sign in to comment.