From ced0838a825076b76de631dc1a1216acf65f2b92 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 16 May 2001 12:31:08 +0000 Subject: - Fixed bug in path_uri() --- modules/headline.module | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'modules/headline.module') diff --git a/modules/headline.module b/modules/headline.module index 1d4474f00..76a05588b 100644 --- a/modules/headline.module +++ b/modules/headline.module @@ -226,6 +226,8 @@ function headline_admin() { function headline_export_rdf() { global $status; + $uri = substr(path_uri(), 0, strlen(path_uri()) - strlen("export/")); + header("Content-Type: text/plain"); print "\n"; @@ -235,7 +237,7 @@ function headline_export_rdf() { print "\n"; print " ". variable_get(site_name, "drupal") ."\n"; - print " ". path_uri() ."\n"; + print " ". $uri ."\n"; print " ". variable_get(site_name, "drupal") ."\n"; print "\n"; @@ -244,7 +246,7 @@ function headline_export_rdf() { while ($node = db_fetch_object($result)) { print "\n"; print " ". check_export($node->title) ."\n"; - print " ". path_uri() ."node.php?id=$node->nid\n"; + print " ". $uri ."node.php?id=$node->nid\n"; print "\n"; } @@ -254,6 +256,8 @@ function headline_export_rdf() { function headline_export_rss() { global $status; + $uri = substr(path_uri(), 0, strlen(path_uri()) - strlen("export/")); + header("Content-Type: text/plain"); print "\n"; @@ -262,9 +266,9 @@ function headline_export_rss() { print "xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n"; print "xmlns=\"http://purl.org/rss/1.0/\">\n\n"; - print "\n"; + print "\n"; print " ". variable_get(site_name, "drupal") ."\n"; - print " ". path_uri() ."\n"; + print " ". $uri ."\n"; print " ". variable_get(site_name, "drupal") ."\n"; print " \n"; @@ -273,7 +277,7 @@ function headline_export_rss() { $result = db_query("SELECT * FROM node WHERE promote = '1' AND status = '$status[posted]' ORDER BY timestamp DESC LIMIT 10"); while ($node = db_fetch_object($result)) { - print " nid\" />\n"; + print " nid\" />\n"; } print " \n"; @@ -283,9 +287,9 @@ function headline_export_rss() { $result = db_query("SELECT * FROM node WHERE promote = '1' AND status = '$status[posted]' ORDER BY timestamp DESC LIMIT 10"); while ($node = db_fetch_object($result)) { - print "nid\">\n"; + print "nid\">\n"; print " ". check_export($node->title) ."\n"; - print " ". path_uri() ."node.php?id=$node->nid\n"; + print " ". $uri ."node.php?id=$node->nid\n"; if ($node->abstract) print " ". check_output($node->abstract, 1) ."\n"; if ($node->body) print " ". check_output($node->body, 1) ."\n"; -- cgit v1.2.3