diff options
author | Struan Donald <struan@exo.org.uk> | 2011-11-28 16:18:24 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-11-28 16:18:24 +0000 |
commit | 13ade239723d21fd1a288f0225e134ef4f21f8fc (patch) | |
tree | 7a9a40609edcacc5dbcba85927def404ff2ccef0 /perllib/FixMyStreet/App/Controller/Rss.pm | |
parent | 252ba7c5bf2317b21a84400beeeeb804d1f81f65 (diff) |
add postcode to problem title in Rss feed
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Rss.pm')
-rwxr-xr-x | perllib/FixMyStreet/App/Controller/Rss.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm index 6152f5a17..8b98433bb 100755 --- a/perllib/FixMyStreet/App/Controller/Rss.pm +++ b/perllib/FixMyStreet/App/Controller/Rss.pm @@ -250,6 +250,11 @@ sub add_row : Private { (my $link = $alert_type->item_link) =~ s/{{(.*?)}}/$row->{$1}/g; (my $desc = _($alert_type->item_description)) =~ s/{{(.*?)}}/$row->{$1}/g; my $url = $c->uri_for( $link ); + + if ( $row->{postcode} ) { + $title .= ", $row->{postcode}"; + } + my %item = ( title => ent($title), link => $url, @@ -267,7 +272,7 @@ sub add_row : Private { if ( $row->{used_map} ) { # TODO: uncomment these when the populate script has been run # my $address = $c->cobrand->find_closest_address_for_rss( $row->{latitude}, $row->{longitude}, $row ); - # $item{description} .= ent("\n<br>$address"); + # $item{description} .= ent("\n<br>$address") if $address; } my $recipient_name = $c->cobrand->contact_name; |