aboutsummaryrefslogtreecommitdiffstats
path: root/web/index.cgi
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2011-04-21 10:30:51 +0200
committerPetter Reinholdtsen <pere@hungry.com>2011-04-21 10:30:51 +0200
commit9cd6b4bdf67f14a6a076f53f3cd4db804026cc41 (patch)
tree58ca2fbf98ca332004f70a5c45f233120baf848a /web/index.cgi
parentc016d4f9f18a41755a5a4774811deb9fd0064466 (diff)
Add changes needed to handle the same category in several areas/councils.
Diffstat (limited to 'web/index.cgi')
-rwxr-xr-xweb/index.cgi4
1 files changed, 3 insertions, 1 deletions
diff --git a/web/index.cgi b/web/index.cgi
index c8fdb6158..c4b1fd9c6 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();