summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-03-25 10:49:14 +0000
committerDries Buytaert <dries@buytaert.net>2001-03-25 10:49:14 +0000
commit107ac01a519d985bdf7f66a1062b16516bc2c4af (patch)
treed3595ae7755e8c1daca9a26043612e708acd42fa
parent4f07fe1a01e601ccf40aefd46467dd5dfe484e99 (diff)
downloadbrdo-107ac01a519d985bdf7f66a1062b16516bc2c4af.tar.gz
brdo-107ac01a519d985bdf7f66a1062b16516bc2c4af.tar.bz2
- 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.)
-rw-r--r--modules/headline.module10
1 files changed, 5 insertions, 5 deletions
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 " <description>$site_name</description>\n";
print "</channel>\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 "<item>\n";
- print " <title>". check_export($story->subject) ."</title>\n";
- print " <link>". $site_url ."story.php?id=$story->id</link>\n";
+ print " <title>". check_export($node->title) ."</title>\n";
+ print " <link>". $site_url ."node.php?id=$node->id</link>\n";
print "</item>\n";
}