aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Location.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-08-17 22:56:37 +0100
committerStruan Donald <struan@exo.org.uk>2011-08-17 22:56:37 +0100
commit3b5d561700b184c20e63111d4cbc1daab78e16c6 (patch)
treef0c53c6bf8d4ebf12e5388053ad856fb0d0e7b86 /perllib/FixMyStreet/App/Controller/Location.pm
parent390f8e8ad1e10f832c4323c39bed2c883744a03f (diff)
parentf38b8e985697c35a62374a2f02dce2d681ef58cd (diff)
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet into new_statuses
Conflicts: db/schema.sql perllib/FixMyStreet/App/Controller/Admin.pm perllib/FixMyStreet/DB/Result/User.pm t/app/controller/admin.t templates/web/default/admin/update_edit.html web/css/core.css
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Location.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Location.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Location.pm b/perllib/FixMyStreet/App/Controller/Location.pm
index 9f8260768..df8a090c2 100644
--- a/perllib/FixMyStreet/App/Controller/Location.pm
+++ b/perllib/FixMyStreet/App/Controller/Location.pm
@@ -76,12 +76,12 @@ sub determine_location_from_pc : Private {
# $error doubles up to return multiple choices by being an array
if ( ref($error) eq 'ARRAY' ) {
- @$error = map {
- decode_utf8($_);
- s/, United Kingdom//;
- s/, UK//;
- $_;
- } @$error;
+ foreach (@$error) {
+ my $a = decode_utf8($_->{address});
+ $a =~ s/, United Kingdom//;
+ $a =~ s/, UK//;
+ $_->{address} = $a;
+ }
$c->stash->{possible_location_matches} = $error;
return;
}