diff options
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Around.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm index a09161494..203296c4d 100644 --- a/perllib/FixMyStreet/App/Controller/Around.pm +++ b/perllib/FixMyStreet/App/Controller/Around.pm @@ -416,7 +416,7 @@ sub lookup_by_ref : Private { external_id => $ref ]; - my $problems = $c->cobrand->problems->search( $criteria ); + my $problems = $c->cobrand->problems->search({ non_public => 0, -or => $criteria }); my $count = try { $problems->count; diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 10c869aee..1c5aae647 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -201,6 +201,10 @@ sub report_form_ajax : Path('ajax') : Args(0) { my $extra_titles_list = $c->cobrand->title_list($c->stash->{all_areas}); my @list_of_names = map { $_->name } values %{$c->stash->{bodies}}; + my %display_names = map { + my $name = $_->get_cobrand_handler ? $_->get_cobrand_handler->council_name : $_->name; + ( $_->name ne $name ) ? ( $_->name => $name ) : (); + } values %{$c->stash->{bodies}}; my $contribute_as = {}; if ($c->user_exists) { my @bodies = keys %{$c->stash->{bodies}}; @@ -227,6 +231,7 @@ sub report_form_ajax : Path('ajax') : Args(0) { category => $category, extra_name_info => $extra_name_info, titles_list => $extra_titles_list, + %display_names ? (display_names => \%display_names) : (), %$contribute_as ? (contribute_as => $contribute_as) : (), $top_message ? (top_message => $top_message) : (), unresponsive => $c->stash->{unresponsive}->{ALL} || '', |