X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FRoot.pm;h=09ace65bb2ac708d886df6c5b0375329918b5a5e;hb=3586132bdff6f0f1effdc21c1837597f9d533842;hp=fcff93f24b0de56073d1d1ef37a7dfe34366e17a;hpb=230e61ee1d992255138b56c50caf9cca52532c2b;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/Root.pm b/lib/NDWeb/Controller/Root.pm index fcff93f..09ace65 100644 --- a/lib/NDWeb/Controller/Root.pm +++ b/lib/NDWeb/Controller/Root.pm @@ -38,7 +38,8 @@ sub index : Local Path Args(0) { sub default : Path { my ( $self, $c ) = @_; - $c->response->status(404); + $c->stash(template => 'default.tt2'); + $c->response->status(410); } sub login : Local { @@ -146,7 +147,7 @@ sub auto : Private { sub redirect : Private { my ($self, $c) = @_; - $c->res->redirect($c->uri_for('/'.$c->flash->{referrer})); + $c->res->redirect($c->uri_for('/'.$c->session->{referrer})); } sub access_denied : Private { @@ -166,7 +167,7 @@ Attempt to render a view, if needed. sub end : ActionClass('RenderView') { my ($self, $c) = @_; - if ($c->res->status == 302){ + if ($c->res->status >= 300 && $c->res->status <= 400 ){ return; } @@ -218,7 +219,7 @@ sub end : ActionClass('RenderView') { $c->stash(birthdays => $birthdays->fetchall_arrayref({})); if ($c->res->status == 200 || $c->req->method eq 'GET'){ - $c->flash(referrer => $c->req->path); + $c->session->{referrer} = $c->req->path; } }