Index: aggregator.module =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator.module,v retrieving revision 1.244 diff -u -w -b -r1.244 aggregator.module --- aggregator.module 3 Jul 2005 15:56:04 -0000 1.244 +++ aggregator.module 3 Aug 2005 23:17:24 -0000 @@ -275,16 +275,35 @@ * Call-back function used by the XML parser. */ function aggregator_element_start($parser, $name, $attributes) { - global $item, $element, $tag; + global $item, $element, $tag, $items, $channel; switch ($name) { case 'IMAGE': case 'TEXTINPUT': + case 'CONTENT': + case 'SUMMARY': + case 'TAGLINE': + case 'SUBTITLE': + case 'LOGO': $element = $name; break; + case 'LINK': + if ($attributes['REL'] == 'alternate') { + if ($element == 'ITEM') { + $items[$item]['LINK'] = $attributes['HREF']; + } else { + $channel['LINK'] = $attributes['HREF']; + } + } + break; case 'ITEM': $element = $name; $item += 1; + break; + case 'ENTRY': + $element = 'ITEM'; + $item += 1; + break; } $tag = $name; @@ -300,6 +319,8 @@ case 'IMAGE': case 'TEXTINPUT': case 'ITEM': + case 'ENTRY': + case 'CONTENT': $element = ''; } } @@ -315,8 +336,24 @@ $items[$item][$tag] .= $data; break; case 'IMAGE': + case 'LOGO': $image[$tag] .= $data; break; + case 'LINK': + if ($data) { + $items[$item][$tag] .= $data; + } + break; + case 'CONTENT': + $items[$item]['DESCRIPTION'] .= $data; + break; + case 'SUMMARY': + $items[$item]['DESCRIPTION'] .= $data; + break; + case 'TAGLINE': + case 'SUBTITLE': + $channel['DESCRIPTION'] .= $data; + break; case 'TEXTINPUT': // The sub-element is not supported. However, we must recognize // it or its contents will end up in the item array. @@ -488,7 +525,6 @@ $value = preg_replace('/\Won[a-z]+\s*=[^>]+?>/i', '>', $value); $item[$key] = $value; } - /* ** Resolve the item's title. If no title is found, we use ** up to 40 characters of the description ending at a word ***** CVS exited normally with code 1 *****