Show
Ignore:
Timestamp:
05/18/06 16:44:39 (6 years ago)
Author:
nick
Message:

More splitting of data fetch and rendering, this time for Atom

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • wiki-toolkit/trunk/lib/Wiki/Toolkit/Feed/RSS.pm

    r293 r294  
    154154  my (@urls, @items); 
    155155 
    156   foreach my $change (@nodes) 
    157   { 
    158     my $node_name = $change->{name}; 
    159  
    160     my $timestamp = $change->{last_modified}; 
     156  foreach my $node (@nodes) 
     157  { 
     158    my $node_name = $node->{name}; 
     159 
     160    my $timestamp = $node->{last_modified}; 
    161161     
    162162    # Make a Time::Piece object. 
     
    167167    $timestamp = $time->strftime( "%Y-%m-%dT%H:%M:%S$utc_offset" ); 
    168168 
    169     my $author      = $change->{metadata}{username}[0] || $change->{metadata}{host}[0] || ''; 
    170     my $description = $change->{metadata}{comment}[0]  || ''; 
     169    my $author      = $node->{metadata}{username}[0] || $node->{metadata}{host}[0] || ''; 
     170    my $description = $node->{metadata}{comment}[0]  || ''; 
    171171 
    172172    $description .= " [$author]" if $author; 
    173173 
    174     my $version = $change->{version}; 
     174    my $version = $node->{version}; 
    175175    my $status  = (1 == $version) ? 'new' : 'updated'; 
    176176 
    177     my $major_change = $change->{metadata}{major_change}[0]; 
     177    my $major_change = $node->{metadata}{major_change}[0]; 
    178178       $major_change = 1 unless defined $major_change; 
    179179    my $importance = $major_change ? 'major' : 'minor'; 
     
    239239} 
    240240 
     241=item B<rss_timestamp> 
     242 
     243Generate the timestamp for the RSS, by figuring out the age range of 
     244the source data for the feed 
     245 
     246=cut 
    241247sub rss_timestamp 
    242248{