From e9c09311feffe85ef85b16a3feab5247f14a9d3c Mon Sep 17 00:00:00 2001 From: mmk2410 Date: Sat, 12 Mar 2016 10:28:46 +0100 Subject: [PATCH] Fix: Feeds didn't show article content --- .gitignore | 1 + rcc/feed/index.php | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 87a12bb..d874e51 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ nbproject/ .idea/ completer.hist +feed/ diff --git a/rcc/feed/index.php b/rcc/feed/index.php index 6c69105..f98b79b 100644 --- a/rcc/feed/index.php +++ b/rcc/feed/index.php @@ -51,7 +51,7 @@ if ($_SESSION['login']) { $writer->title = $blogtitle; $writer->site_url = $blogurl; - $writer->feed_url = $blogurl . "/feed/feed.atom"; + $writer->feed_url = $blogurl . "/feed/" . $_GET['blog'] . ".atom"; $writer->author = array( 'name' => $blogauthor, 'url' => $blogurl, @@ -67,6 +67,10 @@ if ($_SESSION['login']) { if ($amount == 10) { break; } else { + $file = ArticleGenerator::getText($art_dir, $article); + $text = Parsedown::instance() + ->setBreaksEnabled(true)// with linebreaks + ->text($file); $writer->items[] = array( 'title' => ArticleGenerator::getTitle($art_dir, $article), 'updated' => strtotime( @@ -75,11 +79,9 @@ if ($_SESSION['login']) { 'url' => $blogurl . "./?article=" . substr($article, 0, strlen($article) - 3), 'summary'=> ArticleGenerator::getSummary( - $art_dir, $articles + $art_dir, $article ), - 'content' => "

" . ArticleGenerator::getText( - $art_dir, $articles - ) . "

" + 'content' => $text ); $amount += 1; }