*** aggregator_summary.module	Thu Sep 13 14:17:05 2007
--- aggregator_summary.module.patched	Sun Oct 28 12:56:00 2007
***************
*** 616,622 ****
   * Call-back function used by the XML parser.
   */
  function aggregator_summary_element_start($parser, $name, $attributes) {
!   global $item, $element, $tag, $items, $channel;
  
    switch ($name) {
      case 'IMAGE':
--- 616,624 ----
   * Call-back function used by the XML parser.
   */
  function aggregator_summary_element_start($parser, $name, $attributes) {
!   global $item, $element, $stack, $tag, $items, $channel;
! 
!   if ( !is_array( $stack ) ) $stack = array();
  
    switch ($name) {
      case 'IMAGE':
***************
*** 627,636 ****
--- 629,640 ----
      case 'SUBTITLE':
      case 'LOGO':
      case 'INFO':
+       $stack[] = $element;
        $element = $name;
        break;
      case 'ID':
        if ($element != 'ITEM') {
+         $stack[] = $element;
          $element = $name;
        }
      case 'LINK':
***************
*** 644,653 ****
--- 648,659 ----
        }
        break;
      case 'ITEM':
+       $stack[] = $element;
        $element = $name;
        $item += 1;
        break;
      case 'ENTRY':
+       $stack[] = $element;
        $element = 'ITEM';
        $item += 1;
        break;
***************
*** 660,666 ****
   * Call-back function used by the XML parser.
   */
  function aggregator_summary_element_end($parser, $name) {
!   global $element;
  
    switch ($name) {
      case 'IMAGE':
--- 666,672 ----
   * Call-back function used by the XML parser.
   */
  function aggregator_summary_element_end($parser, $name) {
!   global $element, $stack;
  
    switch ($name) {
      case 'IMAGE':
***************
*** 669,679 ****
      case 'ENTRY':
      case 'CONTENT':
      case 'INFO':
!       $element = '';
        break;
      case 'ID':
        if ($element == 'ID') {
!         $element = '';
        }
    }
  }
--- 675,685 ----
      case 'ENTRY':
      case 'CONTENT':
      case 'INFO':
!       $element = strval( array_pop( $stack ) );
        break;
      case 'ID':
        if ($element == 'ID') {
!         $element = strval( array_pop( $stack ) );
        }
    }
  }
