diff options
-rwxr-xr-x | bin/send-reports | 9 | ||||
-rwxr-xr-x | web/index.cgi | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/bin/send-reports b/bin/send-reports index 322e8e417..d51276e9d 100755 --- a/bin/send-reports +++ b/bin/send-reports @@ -192,8 +192,13 @@ foreach my $row (@$unsent) { } $h{councils_name} = join(_(' and '), @dear); - $h{multiple} = @dear>1 ? "[ " . _("This email has been sent to both councils covering the location of the problem, as the user did not categorise it; please ignore it if you're not the correct council to deal with the issue, or let us know what category of problem this is so we can add it to our system.") . " ]\n\n" - : ''; + if ($h{category} eq _('Other')) { + $h{multiple} = @dear>1 ? "[ " . _("This email has been sent to both councils covering the location of the problem, as the user did not categorise it; please ignore it if you're not the correct council to deal with the issue, or let us know what category of problem this is so we can add it to our system.") . " ]\n\n" + : ''; + } else { + $h{multiple} = @dear>1 ? "[ " . _("This email has been sent to several councils covering the location of the problem, as the category selected is provided for all of them; please ignore it if you're not the correct council to deal with the issue.") . " ]\n\n" + : ''; + } $h{missing} = ''; if ($missing) { my $name = $areas_info->{$missing}->{name}; diff --git a/web/index.cgi b/web/index.cgi index 9f6f2006a..c2482e26b 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -579,11 +579,13 @@ please specify the closest point on land.')) unless %$all_councils; $category = _('Category:'); } else { @$categories = sort { strcoll($a->{category}, $b->{category}) } @$categories; + my %seen; foreach (@$categories) { $council_ok{$_->{area_id}} = 1; next if $_->{category} eq _('Other'); next if $q->{site} eq 'southampton' && $_->{category} eq 'Street lighting'; - push @categories, $_->{category}; + push @categories, $_->{category} unless $seen{$_->{category}}; + $seen{$_->{category}} = 1; } if ($q->{site} eq 'scambs') { @categories = Page::scambs_categories(); |