Fix: Feeds didn't show article content

This commit is contained in:
mmk2410 2016-03-12 10:28:46 +01:00
parent 681f4c3c83
commit e9c09311fe
2 changed files with 8 additions and 5 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
nbproject/
.idea/
completer.hist
feed/

View file

@ -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' => "<p>" . ArticleGenerator::getText(
$art_dir, $articles
) . "</p>"
'content' => $text
);
$amount += 1;
}