diff options
author | Duncan Parkes <duncan@fury.ukcod.org.uk> | 2011-02-18 23:29:17 +0000 |
---|---|---|
committer | Duncan Parkes <duncan@fury.ukcod.org.uk> | 2011-02-18 23:29:17 +0000 |
commit | 08957fb2f8f9120baa19743c47771b4d0df2b634 (patch) | |
tree | ccc20ab11a1173a9cf2a801b11ea349522315aa7 | |
parent | d55adde2905b8c89fc93862d7954c4547168e9ff (diff) |
Point another url to the postcode version.
-rwxr-xr-x | web/alert.cgi | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/web/alert.cgi b/web/alert.cgi index 8924d97f5..8e0779736 100755 --- a/web/alert.cgi +++ b/web/alert.cgi @@ -97,8 +97,10 @@ sub alert_list { return alert_front_page($q, $error) if $error; my $pretty_pc = $input_h{pc}; + my $pretty_pc_text;# This one isnt't getting the nbsp. if (mySociety::PostcodeUtil::is_valid_postcode($input{pc})) { $pretty_pc = mySociety::PostcodeUtil::canonicalise_postcode($input{pc}); + $pretty_pc_text = $pretty_pc; $pretty_pc =~ s/ / /; } @@ -291,7 +293,13 @@ feed, or enter your email address to subscribe to an email alert.')); <input type="radio" name="feed" id="local:$lat:$lon" value="local:$lat:$lon"$checked> <label for="local:$lat:$lon">$rss_label</label> EOF - my $rss_feed = Cobrand::url($cobrand, "/rss/l/$lat,$lon", $q); + my $rss_feed; + if ($pretty_pc_text) { + $rss_feed = Cobrand::url($cobrand, "/rss/pc/$pretty_pc_text", $q); + } else { + $rss_feed = Cobrand::url($cobrand, "/rss/l/$lat,$lon", $q); + } + my $default_link = Cobrand::url($cobrand, "/alert?type=local;feed=local:$lat:$lon", $q); my $rss_details = _('(a default distance which covers roughly 200,000 people)'); $out .= $rss_details; |