Commit d3075189 authored by Dries's avatar Dries

- see previous commit message
parent 107ac01a
......@@ -10,7 +10,7 @@
include_once "modules/backend.class";
function headlineRSS10_export($uri) {
global $site_name, $site_url, $HTTP_REFERER, $HTTP_USER_AGENT;
global $site_name, $site_url, $status, $HTTP_REFERER, $HTTP_USER_AGENT;
if ($uri[1] == "headlinesRSS10.rdf") {
watchdog("message", "grabbed 'headlinesRSS10.rdf' - referring url: $HTTP_REFERER - user agent: $HTTP_USER_AGENT");
......@@ -32,10 +32,10 @@ function headlineRSS10_export($uri) {
print " <items>\n";
print " <rdf:Seq>\n";
$result = db_query("SELECT * FROM stories WHERE status = 2 ORDER BY timestamp DESC LIMIT 10");
$result = db_query("SELECT * FROM nodes WHERE type = 'story' AND status = '$status[posted]' ORDER BY timestamp DESC LIMIT 10");
while ($story = db_fetch_object($result)) {
print " <rdf:li resource=\"". $site_url ."story.php?id=$story->id\" />\n";
while ($node = db_fetch_object($result)) {
print " <rdf:li resource=\"". $site_url ."node.php?id=$node->nid\" />\n";
}
......@@ -43,15 +43,15 @@ function headlineRSS10_export($uri) {
print " </items>\n";
print "</channel>\n\n";
$result = db_query("SELECT * FROM stories WHERE status = 2 ORDER BY timestamp DESC LIMIT 10");
$result = db_query("SELECT * FROM node WHERE type = 'story' AND status = '$status[posted]' ORDER BY timestamp DESC LIMIT 10");
while ($story = db_fetch_object($result)) {
print "<item rdf:about=\"".$site_url ."story.php?id=$story->id\">\n";
print " <title>". check_export($story->subject) ."</title>\n";
print " <link>". $site_url ."story.php?id=$story->id</link>\n";
while ($node = db_fetch_object($result)) {
print "<item rdf:about=\"".$site_url ."node.php?id=$node->nid\">\n";
print " <title>". check_export($node->title) ."</title>\n";
print " <link>". $site_url ."node.php?id=$node->nid</link>\n";
if ($story->abstract)
print " <description>". check_output($story->abstract, 1) ."</description>\n";
if ($node->abstract)
print " <description>". check_output($node->abstract, 1) ."</description>\n";
print "</item>\n";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment