Ignore:
Timestamp:
May 19, 2006, 12:08:19 PM (15 years ago)
Author:
nick
Message:

Pass the requested feed listing through all the feeds code, rather than just assuming it's recent_changes

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore set to
      .vimrc
      *.swp
  • trunk/lib/OpenGuides/Feed.pm

    r785 r790  
    6161   
    6262    my $feed_type = $args{feed_type};
     63    my $feed_listing = $args{feed_listing};
    6364   
    6465    my %known_types = (
     
    6667                          'atom' => 1,
    6768                      );
     69    my %known_listings = (
     70                          'recent_changes' => 1,
     71                         );
    6872                     
    6973    croak "No feed type specified" unless $feed_type;
    7074    croak "Unknown feed type: $feed_type" unless $known_types{$feed_type};
    7175
     76    croak "No feed listing specified" unless $feed_listing;
     77    croak "Unknown feed listing: $feed_listing" unless $known_listings{$feed_listing};
     78
    7279    if ($feed_type eq 'rss') {
    73         return $self->rss_maker->recent_changes(%args);
     80        if ($feed_listing eq 'recent_changes') {
     81            return $self->rss_maker->recent_changes(%args);
     82        }
    7483    }
    7584    elsif ($feed_type eq 'atom') {
    76         return $self->atom_maker->recent_changes(%args);
     85        if ($feed_listing eq 'recent_changes') {
     86            return $self->atom_maker->recent_changes(%args);
     87        }
    7788    }
    7889}
Note: See TracChangeset for help on using the changeset viewer.