aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Rss.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-11-28 16:18:24 +0000
committerStruan Donald <struan@exo.org.uk>2011-11-28 16:18:24 +0000
commit13ade239723d21fd1a288f0225e134ef4f21f8fc (patch)
tree7a9a40609edcacc5dbcba85927def404ff2ccef0 /perllib/FixMyStreet/App/Controller/Rss.pm
parent252ba7c5bf2317b21a84400beeeeb804d1f81f65 (diff)
add postcode to problem title in Rss feed
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Rss.pm')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Rss.pm7
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;