Index: atom.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/atom/atom.module,v retrieving revision 1.15 diff -u -B -r1.15 atom.module --- atom.module 21 Jul 2005 22:16:49 -0000 1.15 +++ atom.module 26 Aug 2005 16:38:36 -0000 @@ -19,8 +19,10 @@ * Implementation of hook_menu */ function atom_menu($may_cache) { + global $base_url; + $items = array(); - drupal_set_html_head(""); + drupal_set_html_head(""); if ($may_cache) { $items[] = array('path' => 'atom/feed', 'title' => t('atom feed'), 'callback' => 'atom_feed', @@ -43,6 +45,17 @@ while ($node = db_fetch_object($nodes)) { $item = node_load(array("nid" => $node->nid)); $link = url("node/$node->nid", NULL, NULL, true); + + if (node_hook($item, 'view')) { + node_invoke($item, 'view', TRUE, FALSE); + } + else { + $item = node_prepare($item, TRUE); + } + + // Allow modules to change $node->teaser before viewing. + node_invoke_nodeapi($item, 'view', true, false); + $output .= " \n"; $output .= ' '. check_plain(strip_tags($item->title)) ."\n"; $output .= ' '. "\n"; @@ -65,20 +78,20 @@ } } // Summary - $output .= ' teaser); - $output .= " ]]>\n"; + $output .= ' '; + $output .= check_plain($item->teaser); + $output .= " \n"; // Body - $output .= ' body); - $output .= " ]]>\n"; + $output .= ' '; + $output .= check_plain($item->body); + $output .= " \n"; $output .= " \n"; } $atom_url = url("atom/feed", NULL, NULL, true); - - header("Content-Type: application/xml"); + + drupal_set_header('Content-Type: application/xml'); print ''. "\n"; print ''. "\n"; print ' '. variable_get("site_name", "drupal") ."\n";