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>
|
echo ']]></description>
|
||||||
<link><![CDATA[' . $v->permalink . ']]></link>
|
<link><![CDATA[' . $v->permalink . ']]></link>
|
||||||
<guid isPermaLink="true"><![CDATA[' . $v->permalink . ']]></guid>
|
<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>
|
<dc:creator>' . $v->author . '</dc:creator>
|
||||||
</item>';
|
</item>';
|
||||||
} else {
|
} else {
|
||||||
|
6
rss.php
6
rss.php
@ -10,7 +10,7 @@
|
|||||||
ob_start(function($output) {
|
ob_start(function($output) {
|
||||||
global $tagSearch;
|
global $tagSearch;
|
||||||
global $latestDisplayedPost;
|
global $latestDisplayedPost;
|
||||||
$RSS_DATE_FORMAT = "D, d M Y H:i:s O";
|
|
||||||
if (!isset($latestDisplayedPost)) {
|
if (!isset($latestDisplayedPost)) {
|
||||||
$latestDisplayedPost = time();
|
$latestDisplayedPost = time();
|
||||||
}
|
}
|
||||||
@ -26,8 +26,8 @@
|
|||||||
<title>' . PAGE_NAME . $tagSearchTitle . '</title>
|
<title>' . PAGE_NAME . $tagSearchTitle . '</title>
|
||||||
<description><![CDATA[' . "Blog of " . PAGE_AUTHOR . $tagSearchTitle . ']]></description>
|
<description><![CDATA[' . "Blog of " . PAGE_AUTHOR . $tagSearchTitle . ']]></description>
|
||||||
<link>' . getServerUrl() . '</link>
|
<link>' . getServerUrl() . '</link>
|
||||||
<lastBuildDate>' . date($RSS_DATE_FORMAT, $latestDisplayedPost) . '</lastBuildDate>
|
<lastBuildDate>' . date(RSS_DATE_FORMAT, $latestDisplayedPost) . '</lastBuildDate>
|
||||||
<pubDate>' . date($RSS_DATE_FORMAT, $latestDisplayedPost) . '</pubDate>
|
<pubDate>' . date(RSS_DATE_FORMAT, $latestDisplayedPost) . '</pubDate>
|
||||||
<ttl>' . RSS_REFRESH_INTERVAL . '</ttl>
|
<ttl>' . RSS_REFRESH_INTERVAL . '</ttl>
|
||||||
<atom:link href="' . getServerUrl() . "/rss.php" . '" rel="self" type="application/rss+xml" />
|
<atom:link href="' . getServerUrl() . "/rss.php" . '" rel="self" type="application/rss+xml" />
|
||||||
' . $output;
|
' . $output;
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
define('RSS_REFRESH_INTERVAL', 14400); // Advertised update interval for the RSS feed
|
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_SHOW_FULL', false); // Show extended section in RSS feed
|
||||||
|
|
||||||
|
define('RSS_DATE_FORMAT', 'D, d M Y H:i:s O');
|
||||||
|
|
||||||
$menuItems = array(
|
$menuItems = array(
|
||||||
array("label" => "Page A", "link" => "?p=00-template", "highlight" => "related-subpages,00-template"),
|
array("label" => "Page A", "link" => "?p=00-template", "highlight" => "related-subpages,00-template"),
|
||||||
array("label" => "Page B", "link" => "?p=404", "highlight" => "404"),
|
array("label" => "Page B", "link" => "?p=404", "highlight" => "404"),
|
||||||
|
Loading…
Reference in New Issue
Block a user