diff options
author | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-03-08 11:32:33 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-03-08 11:32:33 +0000 |
commit | 2532b04b72f6de69f0cf801630f4008a0fc35405 (patch) | |
tree | 9cb266d85c5faf4b1e8e02f1ba0d37e2fb2a32b9 /perllib/Page.pm | |
parent | 4783286565ad46986023a8cb16da07bbbb2c30b5 (diff) |
Store report ID on loop, as otherwise closure uses last value.
Diffstat (limited to 'perllib/Page.pm')
-rw-r--r-- | perllib/Page.pm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm index 0aa06102d..130b5b301 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -672,13 +672,14 @@ sub mapit_check_error { return _('That postcode was not recognised, sorry.') if $location->{code} =~ /^4/; return $location->{error}; } - return if mySociety::Config::get('COUNTRY') eq 'NO'; - my $island = $location->{coordsyst}; - if (!$island) { - return _("Sorry, that appears to be a Crown dependency postcode, which we don't cover."); - } - if ($island eq 'I') { - return _("We do not cover Northern Ireland, I'm afraid, as our licence doesn't include any maps for the region."); + if (mySociety::Config::get('COUNTRY') eq 'GB') { + my $island = $location->{coordsyst}; + if (!$island) { + return _("Sorry, that appears to be a Crown dependency postcode, which we don't cover."); + } + if ($island eq 'I') { + return _("We do not cover Northern Ireland, I'm afraid, as our licence doesn't include any maps for the region."); + } } return 0; } |