diff options
author | Struan Donald <struan@exo.org.uk> | 2011-11-30 22:04:33 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-11-30 22:04:33 +0000 |
commit | 0f43cd3b8fbe82256c052aaad65c6a16e3668cbe (patch) | |
tree | e80405918a85cb8847d4a4ef3e602ff400cba4f0 /perllib/FixMyStreet/App/Controller/Rss.pm | |
parent | d69c8404b6ca7cc3b92f3fd1d175b000f2f82e08 (diff) | |
parent | 783601d101ad0ff356921c2f3af0e8b3b9d6e24e (diff) |
Merge branch 'rss-addresses'
Conflicts:
db/schema.sql
perllib/FixMyStreet/DB/Result/Problem.pm
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Rss.pm')
-rwxr-xr-x | perllib/FixMyStreet/App/Controller/Rss.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm index 7fddbed97..822780b81 100755 --- a/perllib/FixMyStreet/App/Controller/Rss.pm +++ b/perllib/FixMyStreet/App/Controller/Rss.pm @@ -251,6 +251,12 @@ 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} ) { + my $pc = $c->cobrand->format_postcode( $row->{postcode} ); + $title .= ", $pc"; + } + my %item = ( title => ent($title), link => $url, @@ -266,8 +272,8 @@ sub add_row : Private { } if ( $row->{used_map} ) { - #my $address = $c->cobrand->find_closest_address_for_rss( $row->{latitude}, $row->{longitude} ); - #$item{description} .= ent("\n<br>$address"); + my $address = $c->cobrand->find_closest_address_for_rss( $row->{latitude}, $row->{longitude}, $row ); + $item{description} .= ent("\n<br>$address") if $address; } my $recipient_name = $c->cobrand->contact_name; |