*) bugfix for wrong RSS feed pubDate formats

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3449 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 18 years ago
parent 0d178d00a5
commit 6596167277

@ -57,6 +57,7 @@ import java.util.Iterator;
import de.anomic.data.blogBoard;
import de.anomic.data.userDB;
import de.anomic.http.httpHeader;
import de.anomic.http.httpc;
import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
@ -348,6 +349,7 @@ public class Blog {
}
prop.put("mode_entries_" + number + "_date", dateString(entry.date()));
prop.put("mode_entries_" + number + "_rfc822date", httpc.dateString(entry.date()));
prop.put("mode_entries_" + number + "_pageid", entry.key());
prop.put("mode_entries_" + number + "_address", address);
prop.put("mode_entries_" + number + "_ip", entry.ip());

@ -13,7 +13,7 @@
<author><![CDATA[#[author]#]]></author>
<title><![CDATA[#[subject]#]]></title>
<link>http://#[address]#/Blog.html?page=#[pageid]#</link>
<pubDate>#[date]#</pubDate>
<pubDate>#[rfc822date]#</pubDate>
<guid>#[pageid]#</guid>
<description><![CDATA[
#[page]#]]></description>

@ -57,6 +57,7 @@ import de.anomic.data.listManager;
import de.anomic.data.userDB;
import de.anomic.data.bookmarksDB.Tag;
import de.anomic.http.httpHeader;
import de.anomic.http.httpc;
import de.anomic.index.indexURLEntry;
import de.anomic.net.URL;
import de.anomic.plasma.plasmaParserDocument;
@ -257,6 +258,7 @@ public class Bookmarks {
prop.put("bookmarks_"+count+"_title", bookmark.getTitle());
prop.put("bookmarks_"+count+"_description", bookmark.getDescription());
prop.put("bookmarks_"+count+"_date", bookmarksDB.dateToiso8601(new Date(bookmark.getTimeStamp())));
prop.put("bookmarks_"+count+"_rfc822date", httpc.dateString(new Date(bookmark.getTimeStamp())));
prop.put("bookmarks_"+count+"_public", (bookmark.getPublic()? 1:0));
//List Tags.

@ -8,7 +8,7 @@
#{bookmarks}#<item>
<title><![CDATA[#[title]#]]></title>
<link>#[link]#</link>
<pubDate>#[date]#</pubDate>
<pubDate>#[rfc822date]#</pubDate>
<guid>#[hash]#</guid>
<description><![CDATA[<p>#[description]#</p><p>Tagged with | #{tags}#<a href="Bookmarks.html?tag=#[tag]#" class="bookmarkTags">#[tag]#</a> | #{/tags}#</p>]]></description>
#{tags}#<category><![CDATA[#[tag]#]]></category>#{/tags}#

@ -55,6 +55,7 @@ import java.util.TreeMap;
import de.anomic.data.messageBoard;
import de.anomic.data.wikiCode;
import de.anomic.http.httpHeader;
import de.anomic.http.httpc;
import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.server.serverFileUtils;
import de.anomic.server.serverObjects;
@ -149,9 +150,14 @@ public class Messages_p {
prop.put("mode_messages_"+count+"_key", key);
prop.put("mode_messages_"+count+"_hash", message.authorHash());
// also write out the message body (needed for the RSS feed)
if (((String)header.get(httpHeader.CONNECTION_PROP_PATH)).endsWith(".rss")) {
// set the peer address
prop.put("mode_messages_"+count+"_peerAddress", peerAddress);
// set the rfc822 date
prop.put("mode_messages_"+count+"_rfc822Date",httpc.dateString(message.date()));
// also write out the message body (needed for the RSS feed)
try {
prop.put("mode_messages_"+count+"_body",new String(message.message(), "UTF-8"));
} catch (UnsupportedEncodingException e) {

@ -14,7 +14,7 @@
<author><![CDATA[#[from]#]]></author>
<title><![CDATA[#[subject]#]]></title>
<link>http://#[peerAddress]#/Messages_p.html?action=view&amp;object=#[key]#</link>
<pubDate>#[date]#</pubDate>
<pubDate>#[rfc822Date]#</pubDate>
<guid>#[key]#</guid>
<description><![CDATA[#[body]#]]></description>
</item>

Loading…
Cancel
Save