Skip to content
Browse files

make the main link of the events feed link to the actual event or to …

…the wiki, if it is available
  • Loading branch information...
1 parent ab62ac5 commit 1488410182436d3a345760f53715f90cc6006b24 @szabgab committed Mar 6, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/PEG.pm
View
10 lib/PEG.pm
@@ -161,13 +161,21 @@ sub _rss {
my $text = $n->{text} || '';
$text =~ s{"/}{"$base/}g;
+ my $link = $url . ( $n->{permalink} || '' );
+
if ($name eq 'events') {
$text = _event_text($n);
+ my $wiki;
+ if ($n->{wiki}) {
+ $n->{wiki} =~ s/ /_/g;
+ $wiki = "http://perlfoundation.org/perl5/$n->{wiki}";
+ }
+ $link = $wiki || $n->{url} || '';
}
$rss->add_item(
title => decode( 'utf-8', $n->{title} ),
- link => $url . ( $n->{permalink} || '' ),
+ link => $link,
description => decode( 'utf-8', $text ),
dc => {
creator => $n->{author},

0 comments on commit 1488410

Please sign in to comment.
Something went wrong with that request. Please try again.