Permalink
Browse files

reverse the order of the earlier events

  • Loading branch information...
1 parent 35b71e9 commit f65cc3b204b7ba58a339fbd01c2d498f7c932413 @szabgab committed Mar 6, 2011
Showing with 10 additions and 3 deletions.
  1. +10 −3 lib/PEG.pm
View
@@ -21,7 +21,14 @@ sub _read_file {
my $sub = $name eq 'news' ? 'news' : 'events';
if (not $content{data}{$name} or $content{stamp}{$name} < $current_stamp) {
- $content{data}{$name}{$sub} = YAML::LoadFile($file);
+ my $data = YAML::LoadFile($file);
+ if ($name eq 'news') {
+ $content{data}{$name}{$sub} = $data;
+ } elsif ($name eq 'events') {
+ $content{data}{$name}{$sub} = $data;
+ } elsif ($name eq 'earlier_events') {
+ $content{data}{$name}{$sub} = [ reverse @$data ];
+ }
$content{stamp}{$name} = $current_stamp;
}
return;
@@ -62,11 +69,11 @@ get qr{^ / ([\w/-]+) $ }x => sub {
# for historical reasons:
get '/rss' => sub {
- return _rss('news');
+ return _rss('news');
};
get '/rss/news' => sub {
- return _rss('news');
+ return _rss('news');
};
sub _rss {

0 comments on commit f65cc3b

Please sign in to comment.