aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Root.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Root.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Root.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Root.pm b/perllib/FixMyStreet/App/Controller/Root.pm
index 830773542..7e2acc03c 100644
--- a/perllib/FixMyStreet/App/Controller/Root.pm
+++ b/perllib/FixMyStreet/App/Controller/Root.pm
@@ -71,11 +71,12 @@ sub default : Path {
$c->detach('/page_error_404_not_found');
}
-=head2 page_error_404_not_found
+=head2 page_error_404_not_found, page_error_410_gone
- $c->detach('/page_error_404_not_found', [ $error_msg ] );
+ $c->detach( '/page_error_404_not_found', [$error_msg] );
+ $c->detach( '/page_error_410_gone', [$error_msg] );
-Display a 404 page. Pass in an optional error message in an arrayref.
+Display a 404 (not found) or 410 (gone) page. Pass in an optional error message in an arrayref.
=cut
@@ -86,6 +87,13 @@ sub page_error_404_not_found : Private {
$c->response->status(404);
}
+sub page_error_410_gone : Private {
+ my ( $self, $c, $error_msg ) = @_;
+ $c->stash->{template} = 'errors/page_error_410_gone.html';
+ $c->stash->{error_msg} = $error_msg;
+ $c->response->status(410);
+}
+
=head2 end
Attempt to render a view, if needed.