aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 661505a49..fe6310bbf 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -65,15 +65,15 @@ sub display : Path('') : Args(1) {
? undef
: $c->model('DB::Problem')->find( { id => $id } );
- if ( !$problem ) { # bad id or id not found
+ if ( !$problem || $problem->state eq 'unconfirmed' ) {
$c->detach( '/page_error_404_not_found', [ _('Unknown problem ID') ] );
}
-
- # elsif () {
- #
- # }
-
-# return front_page($q, _('That report has been removed from FixMyStreet.'), '410 Gone') if $problem->{state} eq 'hidden';
+ elsif ( $problem->state eq 'hidden' ) {
+ $c->detach(
+ '/page_error_410_gone',
+ [ _('That report has been removed from FixMyStreet.') ] #
+ );
+ }
# my $extra_data = Cobrand::extra_data($cobrand, $q);
# my $google_link = Cobrand::base_url_for_emails($cobrand, $extra_data)