aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2010-10-11 15:27:58 +0100
committerMatthew Somerville <matthew@mysociety.org>2010-10-11 15:27:58 +0100
commit05c7209738695b736e387a0fb226ff1673e0e486 (patch)
treea8a40f84141bb92f910b74b0363a9531e00b8f78
parenta85fe43f641650c48cc8f6bae3cf794241c73237 (diff)
Fix small issues.
-rw-r--r--perllib/Page.pm3
-rwxr-xr-xweb-admin/index.cgi4
2 files changed, 5 insertions, 2 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index fe6a6e8cb..127fad11b 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -918,6 +918,9 @@ sub mapit_check_error {
return $location->{error};
}
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.");
}
diff --git a/web-admin/index.cgi b/web-admin/index.cgi
index b7946d600..2868cf2d6 100755
--- a/web-admin/index.cgi
+++ b/web-admin/index.cgi
@@ -309,7 +309,7 @@ sub admin_council_contacts ($$) {
# Example postcode, link to list of problem reports
my $links_html;
my $example_postcode = mySociety::MaPit::call('area/example_postcode', $area_id);
- if ($example_postcode) {
+ if ($example_postcode && ! ref $example_postcode) {
$links_html .= $q->a({ href => mySociety::Config::get('BASE_URL') . '/?pc=' . $q->escape($example_postcode) },
"Example postcode " . $example_postcode) . " | ";
}
@@ -390,7 +390,7 @@ sub admin_council_edit ($$$) {
# Example postcode
my $example_postcode = mySociety::MaPit::call('area/example_postcode', $area_id);
- if ($example_postcode) {
+ if ($example_postcode && ! ref $example_postcode) {
print $q->p("Example postcode: ",
$q->a({ href => mySociety::Config::get('BASE_URL') . '/?pc=' . $q->escape($example_postcode) },
$example_postcode));