From 107ac01a519d985bdf7f66a1062b16516bc2c4af Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 25 Mar 2001 10:49:14 +0000 Subject: - nodified headline module (It only exports story headline so we might want to move the export function to the story.module in the near feature.) --- modules/headline.module | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules') diff --git a/modules/headline.module b/modules/headline.module index 32a00896d..4234d33ef 100644 --- a/modules/headline.module +++ b/modules/headline.module @@ -189,7 +189,7 @@ function headline_admin() { } function headline_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] == "headlines.rdf") { watchdog("message", "grabbed 'headlines.rdf' - referring url: $HTTP_REFERER - user agent: $HTTP_USER_AGENT"); @@ -207,12 +207,12 @@ function headline_export($uri) { print " $site_name\n"; print "\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)) { + while ($node = db_fetch_object($result)) { print "\n"; - print " ". check_export($story->subject) ."\n"; - print " ". $site_url ."story.php?id=$story->id\n"; + print " ". check_export($node->title) ."\n"; + print " ". $site_url ."node.php?id=$node->id\n"; print "\n"; } -- cgit v1.2.3