Changeset 1821

Show
Ignore:
Timestamp:
10/20/04 16:54:31 (4 years ago)
Author:
emc3
Message:

BUG 390: Fixed support for multiple enclosures.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-rss2.php

    r1786 r1821  
    4747    while( list( $key, $val ) = each( $custom_fields ) ) {  
    4848        if( $key == 'enclosure' ) { 
    49             $enclosure = $val[ 0 ]; 
    50             $enclosure = split( "\n", $enclosure ); 
    51             print "<enclosure url='".trim( $enclosure[ 0 ] )."' length='".trim( $enclosure[ 1 ] )."' type='".trim( $enclosure[ 2 ] )."'/>\n"; 
     49            if (is_array($val)) { 
     50                foreach($val as $enc) { 
     51                    $enclosure = split( "\n", $enc ); 
     52                    print "<enclosure url='".trim( $enclosure[ 0 ] )."' length='".trim( $enclosure[ 1 ] )."' type='".trim( $enclosure[ 2 ] )."'/>\n"; 
     53                } 
     54            } 
    5255        } 
    5356    }