Changeset 297


Ignore:
Timestamp:
May 18, 2006, 5:11:36 PM (14 years ago)
Author:
nick
Message:

Newest, not oldest (doh!)

Location:
wiki-toolkit/trunk/lib/Wiki/Toolkit/Feed
Files:
3 edited

Legend:

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

    r296 r297  
    5656    my @changes = $self->fetch_recently_changed_nodes(%args);
    5757    my $atom_timestamp = $self->feed_timestamp(
    58                               $self->fetch_oldest_for_recently_changed(%args)
     58                              $self->fetch_newest_for_recently_changed(%args)
    5959    );
    6060
     
    151151=item B<feed_timestamp>
    152152
    153 Generate the timestamp for the Atom, based on the oldest node (if available)
     153Generate the timestamp for the Atom, based on the newest node (if available)
    154154
    155155=cut
    156156sub feed_timestamp
    157157{
    158   my ($self, $oldest_node) = @_;
    159  
    160   if ($oldest_node->{last_modified})
    161   {
    162     my $time = Time::Piece->strptime( $oldest_node->{last_modified}, $self->{timestamp_fmt} );
     158  my ($self, $newest_node) = @_;
     159 
     160  if ($newest_node->{last_modified})
     161  {
     162    my $time = Time::Piece->strptime( $newest_node->{last_modified}, $self->{timestamp_fmt} );
    163163
    164164    my $utc_offset = $self->{utc_offset};
  • wiki-toolkit/trunk/lib/Wiki/Toolkit/Feed/Listing.pm

    r296 r297  
    4343
    4444Based on the supplied criteria (but not using all of those used by
    45 B<fetch_recently_changed_nodes>), find the oldest node from the recently
     45B<fetch_recently_changed_nodes>), find the newest node from the recently
    4646changed nodes set. Normally used for dating the whole of a Feed.
    4747
    4848=cut
    49 sub fetch_oldest_for_recently_changed {
     49sub fetch_newest_for_recently_changed {
    5050    my ($self, %args) = @_;
    5151
  • wiki-toolkit/trunk/lib/Wiki/Toolkit/Feed/RSS.pm

    r296 r297  
    6363  my @changes = $self->fetch_recently_changed_nodes(%args);
    6464  my $rss_timestamp = $self->rss_timestamp(
    65                               $self->fetch_oldest_for_recently_changed(%args)
     65                              $self->fetch_newest_for_recently_changed(%args)
    6666  );
    6767
     
    216216=item B<rss_timestamp>
    217217
    218 Generate the timestamp for the RSS, based on the oldest node (if available)
     218Generate the timestamp for the RSS, based on the newest node (if available)
    219219
    220220=cut
    221221sub rss_timestamp
    222222{
    223     my ($self, $oldest_node) = @_;
    224 
    225     if ($oldest_node->{last_modified})
     223    my ($self, $newest_node) = @_;
     224
     225    if ($newest_node->{last_modified})
    226226    {
    227         my $time = Time::Piece->strptime( $oldest_node->{last_modified}, $self->{timestamp_fmt} );
     227        my $time = Time::Piece->strptime( $newest_node->{last_modified}, $self->{timestamp_fmt} );
    228228
    229229        my $utc_offset = $self->{utc_offset};
Note: See TracChangeset for help on using the changeset viewer.