gnucash-htdocs master: Fix relative paths in rss feed code

Geert Janssens gjanssens at code.gnucash.org
Sat Dec 2 04:28:24 EST 2017


Updated	 via  https://github.com/Gnucash/gnucash-htdocs/commit/4cfbe7cc (commit)
	from  https://github.com/Gnucash/gnucash-htdocs/commit/2400375a (commit)



commit 4cfbe7cc80568b58dabc4584e865dd7722c83360
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Dec 2 10:28:19 2017 +0100

    Fix relative paths in rss feed code

diff --git a/atom.php b/atom.php
index bfe9019..73f678d 100644
--- a/atom.php
+++ b/atom.php
@@ -1,7 +1,7 @@
 <?php
   // TODO:
   // - reasonable permalinks
-  $top_dir = ".";
+  $top_dir = "..";
 
   $contentType = "application/atom+xml";
   if (isset($_GET["content-type"]))
@@ -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)).
@@ -30,7 +30,7 @@
 ?>
 <?="<?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">



Summary of changes:
 atom.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)



More information about the gnucash-changes mailing list