From 61b7ba319516fb5178875b2b21fca2f80f9dd9e7 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Sat, 30 Sep 2017 16:09:46 +0200 Subject: [PATCH] Fix bug causing no date in RSS posts --- blog.php | 2 +- rss.php | 6 +++--- shared.php | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/blog.php b/blog.php index 6da8382..df810aa 100644 --- a/blog.php +++ b/blog.php @@ -266,7 +266,7 @@ echo ']]> permalink . ']]> permalink . ']]> - ' . date($RSS_DATE_FORMAT, $v->ctime) . ' + ' . date(RSS_DATE_FORMAT, $v->ctime) . ' ' . $v->author . ' '; } else { diff --git a/rss.php b/rss.php index c7819d0..433756e 100644 --- a/rss.php +++ b/rss.php @@ -10,7 +10,7 @@ ob_start(function($output) { global $tagSearch; global $latestDisplayedPost; - $RSS_DATE_FORMAT = "D, d M Y H:i:s O"; + if (!isset($latestDisplayedPost)) { $latestDisplayedPost = time(); } @@ -26,8 +26,8 @@ ' . PAGE_NAME . $tagSearchTitle . ' ' . getServerUrl() . ' - ' . date($RSS_DATE_FORMAT, $latestDisplayedPost) . ' - ' . date($RSS_DATE_FORMAT, $latestDisplayedPost) . ' + ' . date(RSS_DATE_FORMAT, $latestDisplayedPost) . ' + ' . date(RSS_DATE_FORMAT, $latestDisplayedPost) . ' ' . RSS_REFRESH_INTERVAL . ' ' . $output; diff --git a/shared.php b/shared.php index 57d44e3..9c2a5ad 100644 --- a/shared.php +++ b/shared.php @@ -17,6 +17,8 @@ define('RSS_REFRESH_INTERVAL', 14400); // Advertised update interval for the RSS feed define('RSS_SHOW_FULL', false); // Show extended section in RSS feed + define('RSS_DATE_FORMAT', 'D, d M Y H:i:s O'); + $menuItems = array( array("label" => "Page A", "link" => "?p=00-template", "highlight" => "related-subpages,00-template"), array("label" => "Page B", "link" => "?p=404", "highlight" => "404"),