Fix bug causing no date in RSS posts
This commit is contained in:
parent
22a71573fb
commit
61b7ba3195
2
blog.php
2
blog.php
@ -266,7 +266,7 @@
|
||||
echo ']]></description>
|
||||
<link><![CDATA[' . $v->permalink . ']]></link>
|
||||
<guid isPermaLink="true"><![CDATA[' . $v->permalink . ']]></guid>
|
||||
<pubDate>' . date($RSS_DATE_FORMAT, $v->ctime) . '</pubDate>
|
||||
<pubDate>' . date(RSS_DATE_FORMAT, $v->ctime) . '</pubDate>
|
||||
<dc:creator>' . $v->author . '</dc:creator>
|
||||
</item>';
|
||||
} else {
|
||||
|
6
rss.php
6
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 @@
|
||||
<title>' . PAGE_NAME . $tagSearchTitle . '</title>
|
||||
<description><![CDATA[' . "Blog of " . PAGE_AUTHOR . $tagSearchTitle . ']]></description>
|
||||
<link>' . getServerUrl() . '</link>
|
||||
<lastBuildDate>' . date($RSS_DATE_FORMAT, $latestDisplayedPost) . '</lastBuildDate>
|
||||
<pubDate>' . date($RSS_DATE_FORMAT, $latestDisplayedPost) . '</pubDate>
|
||||
<lastBuildDate>' . date(RSS_DATE_FORMAT, $latestDisplayedPost) . '</lastBuildDate>
|
||||
<pubDate>' . date(RSS_DATE_FORMAT, $latestDisplayedPost) . '</pubDate>
|
||||
<ttl>' . RSS_REFRESH_INTERVAL . '</ttl>
|
||||
<atom:link href="' . getServerUrl() . "/rss.php" . '" rel="self" type="application/rss+xml" />
|
||||
' . $output;
|
||||
|
@ -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"),
|
||||
|
Loading…
Reference in New Issue
Block a user