summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-07-13 12:06:45 +0000
committerDries Buytaert <dries@buytaert.net>2006-07-13 12:06:45 +0000
commit254b8bbaac8f4fe30481c254564f9bf231c6d38c (patch)
treeee2cdb5f2f94371a640f0502c9e0f0b8436d311a /modules
parent89c68399bc5afa8d00953351ff34b8907f738c99 (diff)
downloadbrdo-254b8bbaac8f4fe30481c254564f9bf231c6d38c.tar.gz
brdo-254b8bbaac8f4fe30481c254564f9bf231c6d38c.tar.bz2
- Patch #41703 by drewish et al: allow node altering for RSS generation.
Diffstat (limited to 'modules')
-rw-r--r--modules/node/node.module17
1 files changed, 9 insertions, 8 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 6eb5063f0..9ad7a6acd 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1433,6 +1433,15 @@ function node_feed($nodes = 0, $channel = array()) {
node_invoke_nodeapi($item, 'view', $teaser, FALSE);
}
+ // Allow modules to add additional item fields and/or modify $item
+ $extra = node_invoke_nodeapi($item, 'rss item');
+ $extra = array_merge($extra, array(array('key' => 'pubDate', 'value' => date('r', $item->created)), array('key' => 'dc:creator', 'value' => $item->name), array('key' => 'guid', 'value' => $item->nid . ' at ' . $base_url, 'attributes' => array('isPermaLink' => 'FALSE'))));
+ foreach ($extra as $element) {
+ if ($element['namespace']) {
+ $namespaces = array_merge($namespaces, $element['namespace']);
+ }
+ }
+
// Prepare the item description
switch ($item_length) {
case 'fulltext':
@@ -1449,14 +1458,6 @@ function node_feed($nodes = 0, $channel = array()) {
break;
}
- // Allow modules to add additional item fields
- $extra = node_invoke_nodeapi($item, 'rss item');
- $extra = array_merge($extra, array(array('key' => 'pubDate', 'value' => date('r', $item->created)), array('key' => 'dc:creator', 'value' => $item->name), array('key' => 'guid', 'value' => $item->nid . ' at ' . $base_url, 'attributes' => array('isPermaLink' => 'FALSE'))));
- foreach ($extra as $element) {
- if ($element['namespace']) {
- $namespaces = array_merge($namespaces, $element['namespace']);
- }
- }
$items .= format_rss_item($item->title, $link, $item_text, $extra);
}