diff options
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 11 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 4 |
3 files changed, 16 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm index 41aee3869..4888a39f3 100644 --- a/perllib/FixMyStreet/App/Controller/Report.pm +++ b/perllib/FixMyStreet/App/Controller/Report.pm @@ -83,7 +83,7 @@ sub load_problem_or_display_error : Private { : $c->cobrand->problems->find( { id => $id } ); # check that the problem is suitable to show. - if ( !$problem || $problem->state eq 'unconfirmed' || $problem->state eq 'partial' ) { + if ( !$problem || ($problem->state eq 'unconfirmed' && !$c->cobrand->show_unconfirmed_reports) || $problem->state eq 'partial' ) { $c->detach( '/page_error_404_not_found', [ _('Unknown problem ID') ] ); } elsif ( $problem->state eq 'hidden' ) { diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index c3f8b255e..998f287a1 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -723,5 +723,16 @@ until the contacts/area/body handling is rewritten to be better. sub reports_by_body { 0; } +=head2 show_unconfirmed_reports + +Whether reports in state 'unconfirmed' should still be shown on the public site. +(They're always included in the admin interface.) + +=cut + +sub show_unconfirmed_reports { + 0; +} + 1; diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 2cd2688fd..7255906c7 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -32,4 +32,8 @@ sub remove_redundant_areas { } } +sub show_unconfirmed_reports { + 1; +} + 1; |