From d30751899897dc67f5f0563133ec14164cdfb993 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 25 Mar 2001 10:53:16 +0000 Subject: [PATCH] - see previous commit message --- modules/headlineRSS10.module | 48 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/modules/headlineRSS10.module b/modules/headlineRSS10.module index f0d5b040e8..eacd7c7d5b 100644 --- a/modules/headlineRSS10.module +++ b/modules/headlineRSS10.module @@ -2,7 +2,7 @@ // RSS 1.0 headline exporter (v0.1) // -// Kristjan Jansen -- kika@sloleht.ee +// Kristjan Jansen -- kika@sloleht.ee $module = array("export" => "headlineRSS10_export"); @@ -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"); @@ -19,40 +19,40 @@ function headlineRSS10_export($uri) { print "\n"; print "\n\n"; print "\n"; - print " $site_name\n"; - print " $site_url\n"; - print " $site_name\n"; + print " $site_name\n"; + print " $site_url\n"; + print " $site_name\n"; + + + print " \n"; + print " \n"; + $result = db_query("SELECT * FROM nodes WHERE type = 'story' AND status = '$status[posted]' ORDER BY timestamp DESC LIMIT 10"); - print " \n"; - print " \n"; - - $result = db_query("SELECT * FROM stories WHERE status = 2 ORDER BY timestamp DESC LIMIT 10"); + while ($node = db_fetch_object($result)) { + print " nid\" />\n"; - while ($story = db_fetch_object($result)) { - print " id\" />\n"; - } - print " \n"; - print " \n"; + print " \n"; + print " \n"; print "\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 ($node = db_fetch_object($result)) { + print "nid\">\n"; + print " ". check_export($node->title) ."\n"; + print " ". $site_url ."node.php?id=$node->nid\n"; + + if ($node->abstract) + print " ". check_output($node->abstract, 1) ."\n"; - while ($story = db_fetch_object($result)) { - print "id\">\n"; - print " ". check_export($story->subject) ."\n"; - print " ". $site_url ."story.php?id=$story->id\n"; - - if ($story->abstract) - print " ". check_output($story->abstract, 1) ."\n"; - print "\n"; } -- GitLab