diff --git a/modules/node.module b/modules/node.module index b5facee02d1..f2e8ffb8717 100644 --- a/modules/node.module +++ b/modules/node.module @@ -985,35 +985,20 @@ function node_feed($nodes = 0, $channel = array()) { */ $item = node_load(array("nid" => $node->nid)); - - /* - ** Transform the node information into an RSS item: - */ - - $items .= format_rss_item($item->title, url(node_url($node)), ($item->teaser ? $item->teaser : $item->body)); - - /* - ** Determine the publication date: - */ - - if ($item->updated > $pubdate) { - $pubdate = $item->updated; - } - if ($item->created > $pubdate) { - $pubdate = $item->created; - } + $link = url(node_url($node)); + $items .= format_rss_item($item->title, $link, ($item->teaser ? $item->teaser : $item->body), array("pubDate" => date("r", $item->changed))); } $output .= "\n"; $output .= "]>\n"; - if (!$channel["version"]) $channel["version"] = "0.91"; + if (!$channel["version"]) $channel["version"] = "0.92"; if (!$channel["title"]) $channel["title"] = variable_get("site_name", "drupal") ." - ". variable_get("site_slogan", ""); if (!$channel["link"]) $channel["link"] = $base_url; if (!$channel["description"]) $channel["description"] = variable_get("site_mission", ""); foreach ($languages as $key => $value) break; if (!$channel["language"]) $channel["language"] = $key ? $key : "en"; $output .= "\n"; - $output .= format_rss_channel($channel["title"], $channel["link"], $channel["description"], $items, $channel["language"], array("pubDate" => date("r", $pubdate))); + $output .= format_rss_channel($channel["title"], $channel["link"], $channel["description"], $items, $channel["language"]); $output .= "\n"; header("Content-Type: text/xml"); diff --git a/modules/node/node.module b/modules/node/node.module index b5facee02d1..f2e8ffb8717 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -985,35 +985,20 @@ function node_feed($nodes = 0, $channel = array()) { */ $item = node_load(array("nid" => $node->nid)); - - /* - ** Transform the node information into an RSS item: - */ - - $items .= format_rss_item($item->title, url(node_url($node)), ($item->teaser ? $item->teaser : $item->body)); - - /* - ** Determine the publication date: - */ - - if ($item->updated > $pubdate) { - $pubdate = $item->updated; - } - if ($item->created > $pubdate) { - $pubdate = $item->created; - } + $link = url(node_url($node)); + $items .= format_rss_item($item->title, $link, ($item->teaser ? $item->teaser : $item->body), array("pubDate" => date("r", $item->changed))); } $output .= "\n"; $output .= "]>\n"; - if (!$channel["version"]) $channel["version"] = "0.91"; + if (!$channel["version"]) $channel["version"] = "0.92"; if (!$channel["title"]) $channel["title"] = variable_get("site_name", "drupal") ." - ". variable_get("site_slogan", ""); if (!$channel["link"]) $channel["link"] = $base_url; if (!$channel["description"]) $channel["description"] = variable_get("site_mission", ""); foreach ($languages as $key => $value) break; if (!$channel["language"]) $channel["language"] = $key ? $key : "en"; $output .= "\n"; - $output .= format_rss_channel($channel["title"], $channel["link"], $channel["description"], $items, $channel["language"], array("pubDate" => date("r", $pubdate))); + $output .= format_rss_channel($channel["title"], $channel["link"], $channel["description"], $items, $channel["language"]); $output .= "\n"; header("Content-Type: text/xml");