From ec33170520e04c495ced825dbcc814cc0fe8344e Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 12 Apr 2007 11:52:05 +0000 Subject: [PATCH] Add news item content as field in RSS feed. Fixes viewers that want to show more than just the link and title, like Sage. --- IcculusNews_daemon.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/IcculusNews_daemon.pl b/IcculusNews_daemon.pl index 53a9f0b..1bad740 100755 --- a/IcculusNews_daemon.pl +++ b/IcculusNews_daemon.pl @@ -491,7 +491,7 @@ sub generate_rdf { $max = $row[8] if not defined $max; $sql = "select t1.author, t1.id, t1.title, t1.postdate, t2.name," . - " t1.ip, t1.approved, t1.deleted" . + " t1.ip, t1.approved, t1.deleted, t1.text" . " from $dbtable_items as t1" . " left outer join $dbtable_users as t2" . " on t1.author=t2.id" . @@ -525,6 +525,7 @@ sub generate_rdf { my $ipaddr = long2ip($row[5]); my $approved = $row[6]; my $deleted = $row[7]; + my $text = encode_entities($row[8]); my $viewurl = $itemviewurl; 1 while ($viewurl =~ s/\%id/$itemid/); $viewurl = encode_entities($viewurl); @@ -542,6 +543,7 @@ sub generate_rdf { $rdfitems .= " $ipaddr\n"; $rdfitems .= " $approved\n"; $rdfitems .= " $deleted\n"; + $rdfitems .= " \n$text\n \n"; $rdfitems .= " "; } $sth->finish();